Hello All,

We are working on translation project using PHP, mysql and Apache and facing some problems on IE browser while displaying non English and double byte characters.
The interface should be able to save English, non English and double byte characters from Browser. when we save from Mozilla firefox, it converts those characters to the hex code and save it in the database, and while displaying we just convert the hex code of the character and display so characters displays correctly. But when we save non English and double byte characters from IE , they get saved in the database in some binary format (actually they are not saved in the database as their hex code), so these characters are not displayed correctly on any browser ( in IE as well as Mozilla).

As I understand, problem is in the saving in the database in correct format, and I am not sure if there is any method to display the weird characters saved from IE browser.

Please suggest a solution if anybody came across or worked on this type of issue.

Please Note: We cannot keep the character encoding fixed to UTF-8 in the browser. This encoding can be anything set up by the user.

Example

Input Language Saved in database in this format Browser Name
купите бездисковый лицензионный пакет Russian купите бездисковый лицензионный пакет Mozilla firefox
купите бездисковый лицензионный пакет Russian êóïèòå áåçäèñêîâûé ëèöåíçèîííûé ïàêåò IE

    virendrachandak;10883845 wrote:

    Please Note: We cannot keep the character encoding fixed to UTF-8 in the browser. This encoding can be anything set up by the user.

    Does your application allow the user to change a pages encoding or are you referring to the fact that the browser itself holds this functionality?

    Regards,
    Jon

      the application provides the facility to the user to change the encoding.

        OK - difficult issue then.

        Is it not possible to store all characters in UTF8 and change the encoding for output only? Then, when it's saved back into the DB it goes in as UFT8 again. This is probably a long shot.

        Failing that - the only resolution I can see is if you store the data for each encoding in a separate database. Then you switch database connection depending on the encoding being displayed. This does mean you'll have duplicate data, but it does ensure the end user will see the correct data against the selected encoding.

        Regards

          Write a Reply...