Hi all, Thanks for trying to help. Answering all suggestions and questions:
1. I don?t think this is a presentation issue: I exported the data which I had imported earlier, and the issue is there in the exported files. 2. Version information: Last login: Thu Feb 26 09:06:41 on ttys004 Hg:locs adampodstawczynski$ sqlite3 --version -- Loading resources from /Users/adampodstawczynski/.sqliterc 3.8.7.1 2014-10-29 13:59:56 3b7b72c4685aa5cf5e675c2c47ebec10d9704221 Hg:locs adampodstawczynski$ cat ~/.sqliterc .headers on .mode column Hg:locs adampodstawczynski$ uname -a Darwin Hg 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64 Hg:locs adampodstawczynski$ This is on Mac OS 10.10.2 (Yosemite). 3. I?m not doing any length() operation anywhere in the process, so there is no risk of truncation because of that. I just import the data and the char corruption issue is immediately there. Thanks, -- adam > On 26 Feb 2015, at 10:04, Hick Gunter <hick at scigames.at> wrote: > > Maybe you are falling into the character/byte trap. The SQL function length() > returns the number of CHARACTERS in a string, which - for UTF encoded strings > containing non-latin characters - is smaller than the number of BYTES > required to represent them. > > Typically you will be losing bytes at the end of the string which becomes > really obvious only when you lose part of a multibyte UTF character > > -----Urspr?ngliche Nachricht----- > Von: Adam Podstawczy?ski [mailto:adam at podstawczynski.com] > Gesendet: Donnerstag, 26. Februar 2015 09:44 > An: sqlite-users at mailinglists.sqlite.org > Betreff: [sqlite] Characters corrupt after importing a CSV file > > Hi all, > > I experienced an issue with character encoding in sqlite3 following an import > from a CSV file. > > The issue is described here: > http://stackoverflow.com/questions/28719413/sqlite3-corrupts-some-chars-after-importing?noredirect=1#comment45732717_28719413 > > In short: after importing a UTF-8 file via .import, only some non-lating > chars, mostly at the end of strings, get corrupted. > > Please advise, > -- > adam > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > ___________________________________________ > Gunter Hick > Software Engineer > Scientific Games International GmbH > FN 157284 a, HG Wien > Klitschgasse 2-4, A-1130 Vienna, Austria > Tel: +43 1 80100 0 > E-Mail: hick at scigames.at > > This communication (including any attachments) is intended for the use of the > intended recipient(s) only and may contain information that is confidential, > privileged or legally protected. Any unauthorized use or dissemination of > this communication is strictly prohibited. If you have received this > communication in error, please immediately notify the sender by return e-mail > message and delete all copies of the original communication. Thank you for > your cooperation. > > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users