Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-25 07:19:05

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

database dump & load while preserving non-ASCII chars

I constantly fail to migrate databases from one host onto the other with respect to non-ASCII characters. Umlauts and the like appear messed up upon import into the target database (they get expanded to two characters).

This is hopefully based on my misunderstanding of the concepts involved, though even the wizards operating this forum’s server had related issues recently. Following the procedure in Textbook doesn’t necessarily preserve non-ASCII characters, it seems.

Are there any pointers, hints or tools I could use?

Online

#2 2006-09-25 07:26:16

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: database dump & load while preserving non-ASCII chars

Are you jumping between MySQL versions when you do it?


Alex

Offline

#3 2006-09-25 07:32:52

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: database dump & load while preserving non-ASCII chars

Maybe. I’m developing on MySQl 5.x, but I have little control of the target db version on a hosted webspace. Is this an issue if the target is at least above 4.1?

Last edited by wet (2006-09-25 07:33:04)

Online

#4 2006-09-25 07:57:43

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: database dump & load while preserving non-ASCII chars

What are you using to import/export your data? I have only encountered this with phpmyadmin, not with the command-linetools of mysql. Try updating to the most recent version of phpmyadmin and/or checking the charset-settings of phpmyadmin.

Offline

#5 2006-09-25 08:05:29

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: database dump & load while preserving non-ASCII chars

phpMyAdmin as the least common denominator is the usual tool for import.

Use case: Upload final local site to customer’s low cost web space. So there’s no choice of tools, rather no way to upgrade.

Re: checking charset-settings of phpMyAdmin. Would you mind providing more specific hints, please? There’s a vast choice of language-related settings sprinkled all over phpMyAdmin, from databases through tables and collations up to the final import screen, so one has a great chance to err in that area…

Last edited by wet (2006-09-25 08:07:56)

Online

#6 2006-09-25 08:19:12

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: database dump & load while preserving non-ASCII chars

Re: checking charset-settings of phpMyAdmin. Would you mind providing more specific hints, please?

I hardly use phpmyadmin, so I am not sure which setting was the one causing problems, but (looking at phpmyadmin2.8.x) you should check the setting on the front-page when you first log-in (connection-charset) and the charset where you upload the file for importing. (You should also make sure not to edit/save the dumpfile, in case your editor is muckin around with the file.)
Which setting you need to choose depends on how you installed textpattern (you can usually find the hint in config.php, if it’s an older install and missing it’s most likely latin1).

Offline

#7 2006-09-25 12:41:26

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: database dump & load while preserving non-ASCII chars

Thanks, this seems to be the proper key.

Online

Board footer

Powered by FluxBB