Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to solve this PHP Ajax Arabic Characters Encoding issue?
    primarykey
    data
    text
    <p>I develop a web site using PHP and I connect to Sybase database using PHP ODBC functions.</p> <p>There is a web page related to the Customers in order to input their data to confirm a service provided in the web site.</p> <p>I use Ajax to get the Customer Data from the database in case that the customer enters an ID that exists in the database as I do the query to get his data like Number,Name,Mobile,Email and I concatenate these data so that I make it one string using a seperator character like * then I divide the string using substr() function in the Javascript file when Ajax is operated and the result is returned. I assign the values returned to the text boxes displayed in the web page.</p> <p>This scenario goes perfect even some data is missed in the customer record being sent.</p> <p>My problem is that the database has two languages for the text stored in it : English and Arabic. It goes perfect with English but when the customer data is Arabic, the Javascript acts as there is no data at all or it encodes it to strange characters that could not be read.</p> <p>How I can solve that as I checked all matters related to the langauage and character encoding and using UTF-8 and Windows-1256 and also using the encoding conversion functions in PHP and Javascript Files and making sure of the file encoding itself.</p> <p>Generally I use Windows-1256 to display the Arabic well in my php web pages as if I use UTF-8 the Arabic dynamic data coming from the database could not be displayed well but the Arabic static data written directly in the web page are ok.</p> <p>Any help is appreciated and thanks in advance .....</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload