Page 1 of 1
Swedish characters (ÅÄÖ) in path
Posted: 15.03.2007, 10:54
by CarlG
Hi!
I have just downloaded SQLite Administrator. It looks great. However, it seems to be unable to open databases with Swedish characters (ÅÄÖ, åäö) in the path or filename...
Is this easy to fix?
When trying to open such a DB, SQLite Admin seems to create a new, empty DB with the same name except all Swedish characters are gone...
Regards
Carl Gustafsson
Posted: 15.03.2007, 11:08
by Orbmu2k
At sqlite2 databases i dont see any problems ...
But at Sqlite3 Databases iam also unable to create a database with these chars.
I got:
Code: Select all
library routine called out of sequence
this bug seem so be related by zeoslib
Posted: 28.03.2007, 08:24
by CarlG
Is this something that might be fixed in the overseeable future?
Regards
Carl
Posted: 05.05.2007, 11:22
by stadin
It is related to the Sqlite Version, because since 3.2.5 utf8 is used internally. I had the same problem with german Umlauts in the path. I changed the Open function in ZPlainSqlite3Driver.pas to use utf8 for versions > 3.2.5. Now it works.
function TZSQLite3PlainDriver.Open(const filename: PChar; mode: Integer;
var errmsg: PChar): Psqlite;
var
Result0: Psqlite;
Version: string;
FileNameString: String;
begin
Version := LibVersion;
Result0:= nil;
FileNameString := filename;
if (Version > '3.2.5') then
ZPlainSqLite3.sqlite_open(PAnsiChar(AnsiToUTF8(FileNameString)), Result0)
else
ZPlainSqLite3.sqlite_open(filename, Result0);
Result := Result0;
end;
Posted: 09.05.2007, 20:57
by mdaems
This solution is committed to SVN Testing branch (Rev 246). So this will be included in next Zeoslib release. (Unless somebody says the fix is broken, as I did not test it myself)
Mark
Posted: 29.05.2007, 14:56
by aducom
Why not:
Code: Select all
function TZSQLite3PlainDriver.Open(const filename: PChar; mode: Integer;
var errmsg: PChar): Psqlite;
var
Result0: Psqlite;
begin
Result0:= nil;
if (LibVersion > '3.2.5') then
ZPlainSqLite3.sqlite_open(PAnsiChar(AnsiToUTF8(FileName)), Result0)
else
ZPlainSqLite3.sqlite_open(filename, Result0);
Result := Result0;
end;
??
Posted: 29.05.2007, 22:39
by mdaems
@Aducom
No real reason. I have been thinking about which version to use. I probably choose for readability. When you send me a patch for Sqlite, can you just add this optimization?
Mark
Posted: 30.05.2007, 08:01
by aducom
ok