I am migrating a website to drupal. So far, everything works fine. I wrote some functions to get data from tables I added to the drupal database. The problem is, that the german umlauts from this tables show up wrong while umlauts from normal nodes are ok. How can I fix this?

Thanks in advance.

Comments

gerd riesselmann’s picture

It depends on the applications you used to dump and upload your data. Dumping with MySQLAdministrator and importing with phpMyAdmin may cause problems.

See here for a similar thread: http://drupal.org/node/35538

------------------
Gerd Riesselmann
www.gerd-riesselmann.net

killes@www.drop.org’s picture

that is most likely a latin1 vs. utf-8 issue. Drupal assumes that your content is encoded in utf-8, while other systems often have several choices of which encoding to use. In order to use your data with Drupal, you need to convert it to utf-8. One way to do that (which i have used myself) is to export the database as an sql dump and run iconv or recode on it. Then you can re-import your data base (keep a backup of the original data) and run any import script you may want to use.
--
Drupal services
My Drupal services

akakoko’s picture

I used:
recode latin1..utf-8 file.sql

Thank you very much!

archatas’s picture

I had the same problem a few hours ago porting a Wordpress blog to Drupal and I found that this problem can be solved importing SQL dump file in latin1 using phpMyAdmin 2.6.3.
Wordpress blog was exported to SQL, encoding all the accented characters into html entities.

Maybe this will help someone to solve similar encoding problems.