Page 1 of 1

LC and MariaDB

Posted: Fri Feb 08, 2019 1:24 pm
by ace16vitamine
Hi,

I have switched my DB from SQLite to MariaDB. The DB and the system is configured with UTF8:

Code: Select all

MariaDB [(none)]> show variables like 'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
But now, if I create an Insert, informations like ÄÖÜ are not in the DB. But why? It seems that I am not alone with MariaDB and this issue. If I try to store with LATIN2 the I only receive a ? and not the German "Umlaute".

Any Ideas how to fix this?

Stefan

Re: LC and MariaDB

Posted: Fri Feb 08, 2019 1:28 pm
by Klaus
Hi Stefan,

not sure, but I think you need to textencode() and/or textdecode() the data when saving and/or retrieving data to/from the database.


Best

Klaus

Re: LC and MariaDB

Posted: Sat Feb 09, 2019 1:35 am
by ace16vitamine
Thanks Klaus!

textencode() is working in the case that I encode every SQL insert.