MySQL Forums
Forum List  »  General

Backup / Restore does not respect umlauts
Posted by: Harald Bacik
Date: March 20, 2025 06:30AM

Hey
I am new here in this forum.

I have an old mySQL 5 Server (5.5.28)
The access is by remote.
Within the server, I have a database, which has the following settings:
Charset = latin1
Collation Name = latin1_german1_ci

I do a mysqldump, like this (from my new computer):
mysqldump -u -p -h --skip-set-charset --default-character-set=latin1 --routines -r ~DESTINATION FILE~

This creates my sql file as expected.
When I open the file with Notepad++, it is opened as ANSI, where all umlauts are correct shown.

My local mySQL Server is Version: 8.4.4
The database table has charset: utf8mb4
and Collation Name = utf8mb4_0900_ai_ci.

I try to import the file with the following command:
mysql -u -p -h --default-character-set= utf8 ~databaseName~ < ~DataFile~

but the problem is, that the umlauts are not shown correctly.
For Example.
The original value is 'Nürnberg'
The value I get in my database = 'Nürnberg'
And the hex of the new value = 4EC3BC726E62657267

I also tried to use this on my new server:

SET character_set_client = latin1;
SET character_set_connection = latin1;
SET character_set_results = latin1;

But without positive result.
Can someone please help me.

THX a lot in advance

Options: ReplyQuote


Subject
Written By
Posted
Backup / Restore does not respect umlauts
March 20, 2025 06:30AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.