I have a txt file that I want to import to create a SQLite database.
The C coding is good, import works except one thing:
I am French, so ther are accents in words.
When looking with Notepad++ the text file is in ANSI and would have to be in UTF-8.
How to convert, I tried with WideCharToMultiByte and with code page 28605(iso-8859-15
ISO 8859-15 Latin 9), this not correct for sqlite. When I import the txt file manually using "DB Broowser for SQLIte", it is good. Here is my coding:
sqlite3_snprintf(sizeof(_szTmp),_szTmp,
"INSERT INTO Distance VALUES(%d%7.7d,%d,%d,%d,%f,%f,\"%w\",%d,%d,%d,%f,%f,\"%w\",%f);",
Communes[_i].iDepartement,_iNumRec,
_iCode_Insee_1,
Communes[_i].iRegion,
Communes[_i].iDepartement,
_dLatitude1,_dLongitude1,
Communes[_i].szNomCommune,
_iCode_Insee_2,
Communes[_j].iRegion,
Communes[_j].iDepartement,
_dLatitude2,_dLongitude2,
Communes[_j].szNomCommune,
dDistance[_j]) ;
sqlite3_exec(hParser,_szTmp,0,0,NULL) ;
The txt file can be found at
http://www.mediafire.com/file/y1mi4lyjgtd2sch/Distance_001.txt/file and the databse is at
http://www.mediafire.com/file/jjsylmju833azm6/Distance_001.db3/filePlease help me!!!