If you're on Windows, which cp1252 suggests, just make sure that you don't
end up with a BOM at the start of the file when you convert it. Windows
tools that output utf-8 are sometimes prone to add one even though it's
pointless to have.

On Linux etc., you can try

.import '| iconv -f cp1252 -t utf8 myfile.csv' mytable

to convert on the fly when importing into sqlite.


On Fri, Nov 15, 2019, 12:00 PM Winfried <codecompl...@free.fr> wrote:

> Hello,
>
> I have a big CSV file that's encoded in Latin1 (cp1252), while SQLite
> stores
> strings as Unicode.
>
> Neither Google nor ".help" helped to find if SQLite offers a switch to
> convert Latin1 to UTF-8 on the fly before running the ".import" command.
>
> Should I first convert the file into UTF-8 before importing it into SQLite?
>
> Thank you.
>
>
>
> --
> Sent from: http://sqlite.1065341.n5.nabble.com/
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to