On Tue, 2 Nov 2004, Liz Steel wrote:
>However, when I call sqlite_open with a multibyte string, it doesn't seem to
>work as I expect.
>
>To clarify: I have a database name with Swedish characters in, which are
>converted to multibyte characters, however, the filename that is created
>treats each of the characters separately, which then causes problems later.
>As an example, the string "�ndrad" is converted to "Ändrad".
>
>If I use wcstombs to convert the filename string, this works OK for Swedish
>characters, but then doesn't work for Greek characters.
>
>Does anyone have any ideas?
The code to parse filenames is not UTF8 aware, and so will cause problems
when splitting a filename into directory and filename components if the
string is a UTF8 string. The offending function appears to be
sqlitepager_open in pager.c, which steps backwards through the path name a
character at a time looking the directory seperator character, which will
obviously be tripped up by a multi-byte character.
You should probably avoid using UTF8 for filenames, or raise a bug if you
really need UTF8 filenames.
>
>Thanks,
>
>Liz.
>
Christian
--
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST MS ATTACHMENTS
/ \