European characters (Western charset) with Ajax/PHP

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
worldnet
Forum Newbie
Posts: 4
Joined: Tue Feb 03, 2009 7:26 pm

European characters (Western charset) with Ajax/PHP

Post by worldnet »

How to handle western characters(European charset) is displayed in unreadable format during the data fetched from PHP using Ajax?
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: European characters (Western charset) with Ajax/PHP

Post by Darhazer »

Best of all use utf-8 ;-)

Well, actually, what is the character set of the database and on the page?
When you output something in AJAX, always set the Content-type header with the proper encoding...
Post Reply