Gossamer Forum
Home : Products : Gossamer Links : Discussions :

LSQL database is using UTF-8 charset, but I need ISO-8859-2

Quote Reply
LSQL database is using UTF-8 charset, but I need ISO-8859-2
I have a Links SQL v3.20 installed.
I'm just importing a database which uses ISO-8859-2 encoding.
But in MySQL they are imported as UTF-8.

What can I do to have texts stored in database in ISO-8859-2 format?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Jul 21, 2007, 7:15 AM
Quote Reply
Re: [webmaster33] LSQL database is using UTF-8 charset, but I need ISO-8859-2 In reply to
When in LSQL 3.20 I do Setup/SQL Server/Create new default Gossamer Links tables in this database and overwrite/erase any existing data,
it sets the MySQL charset collation to UTF-8 for all erased tables.
Even if I set a table charset collation to ISO-8859-2, LSQL sets it back to UTF-8, when the table is erased.


LSQL uses only UTF-8 encoding, or it depends on the MySQL database configuration?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] LSQL database is using UTF-8 charset, but I need ISO-8859-2 In reply to
Gossamer Links currently doesn't really do anything special in terms of character sets. If you give it text encoded in UTF-8, it will insert into the database just like that. Perl 5.8 would be required for proper unicode support (the ability to do proper character set conversions, etc), and we aren't ready to set that as a minimum requirement yet (we do want to have proper unicode support though).

Adrian
Quote Reply
Re: [brewt] LSQL database is using UTF-8 charset, but I need ISO-8859-2 In reply to
Thanks for the answer!
I supposed this as I did not find hardcoded UTF-8 charset setting for databases.
Your official answer gave me proof, that LSQL is transparent in terms of database character set,
and in my case only the MySQL database settings should be changed.
I will contact my hosting provider to change the default database character set.


Personally I hate Unicode, so I try to avoid using it.
All chars I need are supported in ISO-8859-2.


I would not be happy, if GT would make UTF-8 in the future as obligatory database charset encoding.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] LSQL database is using UTF-8 charset, but I need ISO-8859-2 In reply to
I believe setting the character set in the database only really only affects string operations. Like if you do a LIKE %multi-byte character%, then it will do the correct thing instead of the slim chance where it could match part of another multi-byte character. The probable reason why everything is stored in UTF-8 in your database is because you imported from dmoz or something similar, where the data is stored in UTF-8.

Adrian
Quote Reply
Re: [brewt] LSQL database is using UTF-8 charset, but I need ISO-8859-2 In reply to
No. I imported from text file, having ISO-8859-2 encoding.
When I installed LSQL 3.20, it created tables using UTF-8 character set.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] LSQL database is using UTF-8 charset, but I need ISO-8859-2 In reply to
I had a problem similar to this. Changing the server mysql charset coding made no difference

It was obviously a server issue because it was resolved when I changed servers.
Quote Reply
Re: [Alba] LSQL database is using UTF-8 charset, but I need ISO-8859-2 In reply to
In MySQL 3.x, 4.x there was no problem with that.
There was only one charset, and that was all.

However in 5.x MySQL changed, and made it more complex. It is possible to have different charset for database and different for the connection. In overall, you can set 4 ot 5 different charsets for different aspects of the database.

That confused me, as I never had such problems before MySQL 5.0.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...