Re: [sqlite] Using Unicode to display data?

2011-06-28 Thread Gilles Ganault
On Tue, 28 Jun 2011 07:48:09 -0400, Richard Hipp
 wrote:
>SQLite uses only unicode (utf8 by default, but it also works with utf16).
>Probably your DBF file was exported as MBCS.  You need to convert the MBCS
>from the export into utf8 or utf16 prior to import into SQLite.

Thanks for the tip. I'll check if the DBD-to-SQLite converter can
export in Unicode.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Using Unicode to display data?

2011-06-28 Thread Igor Tandetnik
Gilles Ganault  wrote:
> After importing DBF files into SQLite, it looks like data are in
> Unicode

Actually, it doesn't look like Unicode, but rather some ANSI codepage (my guess 
would be 1252, Western European). Show the output of this statement:

select hex(name) from varmod_stent2010 limit 5;

where 'name' is the name of the third column, the one with long text.

You need to convert the text to UTF-8 before inserting it into SQLite.
-- 
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Using Unicode to display data?

2011-06-28 Thread Richard Hipp
On Tue, Jun 28, 2011 at 7:24 AM, Gilles Ganault wrote:

> Hello
>
>After importing DBF files into SQLite, it looks like data are in
> Unicode, so I get funny characters when running sqlite3.exe in a DOS
> box on Windows:
>

SQLite uses only unicode (utf8 by default, but it also works with utf16).
Probably your DBF file was exported as MBCS.  You need to convert the MBCS
from the export into utf8 or utf16 prior to import into SQLite.


>
> sqlite> select * from varmod_stent2010 limit 5;
> A10|BE|Industrie manufacturiFre, industries extractives et autres
> A10|FZ|Construction
> A10|GI|Commerce de gros et de dTtail, transports, hTbergement et
> restauration
> A10|JZ|Information et communication
> A10|KZ|ActivitTs financiFres et d'assurance
>
> I typed ".help", but it doesn't seem to include a way to change the
> character set. Is there a solution within sqlite3.exe, or is the only
> way to write a quick PHP script?
>
> Thank you.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Using Unicode to display data?

2011-06-28 Thread Gilles Ganault
Hello

After importing DBF files into SQLite, it looks like data are in
Unicode, so I get funny characters when running sqlite3.exe in a DOS
box on Windows:

sqlite> select * from varmod_stent2010 limit 5;
A10|BE|Industrie manufacturiFre, industries extractives et autres
A10|FZ|Construction
A10|GI|Commerce de gros et de dTtail, transports, hTbergement et
restauration
A10|JZ|Information et communication
A10|KZ|ActivitTs financiFres et d'assurance

I typed ".help", but it doesn't seem to include a way to change the
character set. Is there a solution within sqlite3.exe, or is the only
way to write a quick PHP script?

Thank you.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users