Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.