Jump to content

different character sets for widget


zuzacat

Recommended Posts

Hello everyone,

 

I have created a widget with php which allows users to put on their webpage and displays some information. To display the widget I am creating a javascript code for users to put on their websites.

The javascript has a source of php page like src="widget.php?id=123" When they put the code on their websites php file is executed and displays some texts which is read from a remote XML file. There is no problem up to this point. But while I am reading from this XML file, the texts which are displayed on users webpage, are not in good format becouse I am converting string texts to ISO_8859-9 charset with "iconc" function.

 

If the charset of webpage is ISO-8859-9 text are displayed correctly but if it is not, text are not displayed as expected.

 

In example if the webpage charset is set to UTF-8, characters become unreadable. If I know the charset of webpage I can then convert strings to that charset. But could not find a predifined function thats doing this.

 

Any idea about this problem ? or any other solutions you advice for this problem ?

 

Thank you...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.