Web Hosting Server Philippines, Offshore Programming, Offshore Software Development Philippines
Home -> Resources -> Foreign characters in XHR-served documents

How to get foreign characters in XHR (aka. 'AJAX')-served documents to display properly

The original page that explains the problem and solution: http://erik.eae.net/archives/2005/05/27/18.55.22/

When you serve 'AJAX' content via XHR, the document served is assumed to be encoded as UTF-8, thus foreign characters might not necessarily display correctly if that was not the original character encoding scheme used.

The solution is to figure out what the proper encoding is and tell the web server to serve it as part of the Content-Type header. In PHP, this is how you would do it:

<?
header("Content-Type: text/html; charset=ISO-8859-1");
?>


Back to Top

© 2006 by Andy Sy
last updated: 2006-02-01

NeoTitans- Offshore Outsourced Corporate Web and Software Development Internet Marketing SEO

Web Development / Rich Internet Applications (RIA) Development

Programming Languages

Platforms

Database Development




Offshore Outsourced Corporate Web and Software Development Internet Marketing SEO

Small Business Web Design Philippines Corporate Web Development
   © 2003-2008 Neotitans Technologies Inc.