Igor Tandetnik schrieb:
Da Martian <[EMAIL PROTECTED]> wrote:
So if I look at a name with umlaughts in the database via sqlite3.exe
I get:

Städt. Klinikum Neunkirchen gGmbH
  --
  |
  an "a" with two dots on top

"A with umlaut" is represented as two bytes in UTF-8. sqlite3.exe just dumps these bytes onto the console, which is not smart enough to interpret them as UTF-8 sequence. In other words, the data in the databse is fine, it's just displayed incorrectly (in the wrong codepage). You don't need to worry.

So I tried the *16 versions, but now the field size returned by
"sqlite3_column_bytes16" always seems to be larger than the string I
get back resulting in junk characters on the end.

In my storage framework for VASmalltalk I have to convert all my strings - to
get all the stuff right.

Each string you work with is not only characterized by the characters you
have, but also the code page the string is defined in.

In general this is very often the code page of the operating system (under
Windows 1252, under OS/2 850 - using them in a German locale).

To make it more complicate it is also needed to have a suitable font for that
code page.

VASmalltalk for example works internally with code page 819 on all
available platforms, but under Windows it has to support the code
page 1252.

Therefore when storing strings within this IDE one has to convert the
string from code page 819 to UTF-8. UTF-8 is a special code page under
Windows: 65001. Therefore I convert the strings from 819 to 65001 and
then send this converted string to the API call.

Perhaps it would be nice to change sqlite3 in that way, that (when columns
with storage class text) these columns are converted to the host platform
code page. But actually even in that situation you may have strings, which
are not displayable on your screen - because you have no suitable font.

Marten









-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to