Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 15th, 2007, 04:44 PM
Registered User
Join Date: Nov 2007
Location: riyadh, riyadh, Saudi Arabia.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to farukcse
Default encoding problem with arabic character

Dear Sir,
i am facing a problem with encoding for arabic characters.
here is the code:

<script type="text/javascript">
var AJAX = {
  initialize: function(){
    var xmlHTTP;
    try{xmlHTTP = new XMLHttpRequest();}
      try{xmlHTTP = new ActiveXObject("Msxml2.XMLHTTP");}
        try{xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP");}
          alert("Your browser does not support AJAX!");
          return false;
    return xmlHTTP;

  get: function(url, func){
    var obj = this.initialize();
    obj.open('GET', url, true);
    obj.onreadystatechange = function(){
      if(obj.readyState == 4){

function getUpdate(txt){
  document.getElementById('getReturn').innerHTML = txt;

<input type="text" id="test" name="test" value="blah" onkeyup="AJAX.get('test.php?x=' + this.value, getUpdate)" />
<div id="getReturn"></div>


header('Content-Type: text/html; charset=utf-8');

echo $_GET['x'];

if i put english character then there is no problem.
ie. input: f f f output: f f f
but if i put arabic character then i got error.
i.einput: #213; #213; #213;
output:? ? ?

so can anyone tell me how to solve this problem?

Faruk Chowdhury
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid Character in the given encoding mswin XSLT 3 November 28th, 2008 06:01 AM
arabic problem rimalolo ASP.NET 2.0 Basics 0 May 11th, 2006 06:07 AM
Arabic problem asifshaikh VB How-To 1 February 19th, 2006 09:27 PM
How can i display the Arabic character Muhammad Arif BOOK: Beginning Visual C++ 6 1 March 25th, 2005 06:39 AM
How can i display arabic character in vc++.6 Muhammad Arif Visual C++ 1 April 20th, 2004 01:59 PM

All times are GMT -4. The time now is 06:50 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.