LC and MariaDB

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

LC and MariaDB

Post by ace16vitamine » Fri Feb 08, 2019 1:24 pm

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

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: LC and MariaDB

Post by Klaus » Fri Feb 08, 2019 1:28 pm

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

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: LC and MariaDB

Post by ace16vitamine » Sat Feb 09, 2019 1:35 am

Thanks Klaus!

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

Post Reply

Return to “Databases”