Jump to content

Character sets


aQ

Recommended Posts

Hello!

 

I'm developing a website where I use some RSS data from an external source. The data comes in UTF-8-format. I get data from my database to find the RSS-feed I want. The problem is that the data from the database comes out like this: http://www.yr.no/sted/Norge/S�r-Tr�ndelag/Trondheim/Trondheim/varsel.xml. The �'s are æ's ø's and å's, all nordic special letters. How do I change the character set in MySQL (PhpMyAdmin).

 

I have tried to change it under "Operations", where I changed it to "utf8_swedish_ci". Does anyone know what to do?

Link to comment
https://forums.phpfreaks.com/topic/75122-character-sets/
Share on other sites

I think you needed to specify the column or table as utf8 in the first place (before data was stored in it). See create syntax here:

 

http://dev.mysql.com/doc/refman/5.0/en/create-table.html

 

You also need to run this query before trying to retrieve UTF8 data:

 

SET NAMES 'utf8';

 

 

There's a lot to character sets and you can begin reading here:

 

http://dev.mysql.com/doc/refman/5.0/en/charset.html

Link to comment
https://forums.phpfreaks.com/topic/75122-character-sets/#findComment-379975
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.