UTF 8 not working?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
archeons
Forum Newbie
Posts: 4
Joined: Wed Aug 05, 2009 9:24 pm

UTF 8 not working?

Post by archeons »

I have a database in chinese character when I tried to show it as an xml it shows "????" instead of the chinese character, what must I do? I tried to encode it but so far no luck.
The other database when storing to mysql at phpmyadmin will show funny character but i could retrieve it as chinese character however this time it stores in chinese character.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: UTF 8 not working?

Post by Darhazer »

What is the charset of the database? charset of the connection? what is your code to display the XML? do you pass proper content-type header?
archeons
Forum Newbie
Posts: 4
Joined: Wed Aug 05, 2009 9:24 pm

Re: UTF 8 not working?

Post by archeons »

I found out what was the problem, because the way they save it is using UTF-8 the way to pull it out is using PHP function "pack".
Post Reply