Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
Problem with utf-8 ( becomes £)



Martin_Edney
Novice

Feb 9, 2005, 9:15 AM


Views: 7998
Problem with utf-8 ( becomes £)

I have a web page that uses htmlareas (v2.03). It works fine in Mozilla Firefox, in that the htmlareas don't display, and I get plain text boxes that receive my data and send it to the database just as I need.

However, when I user internet explorer, any "extended" character that I enter into an htmlarea such as or is getting garbled on its way to the database (being stored as £).

To give the full story, the whole application used to work fine, both in IE (with htmlareas) and in Firefox (without htmlareas). Then it was moved to a new web server, where the Apache web server is set to deliver its pages using utf-8 character set, while the MySQL database uses Latin-1 (ISO-8859-1) (previously both web server and database used the same character set). So I've had to add some extra php code to utf-8-encode data on its way from the database to be displayed on the web page. This works fine when running the application in Firefox (no htmlareas), but not in IE (with htmlareas), as described above.

Any ideas please?

Thanks,

Martin


Luis
Veteran

Feb 9, 2005, 9:37 AM


Views: 7985
Re: [Martin_Edney] Problem with utf-8 ( becomes £)

Hi Martin:

You need to convert your special characters into character entities, meaning you need to convert TM into &trade into © etc. Attach your editor and I'll gladly integrate that mod for you.

Greetings


Don't give up!!
http://webstationone.com/test/htmlarea


(This post was edited by Luis on Feb 9, 2005, 9:37 AM)


Martin_Edney
Novice

Feb 9, 2005, 10:04 AM


Views: 7977
Re: [Luis] Problem with utf-8 ( becomes £)

Luis,

Thanks for your quick reply, and offer of help. When you said "attach your editor", I assume I'm meant to attach editor.js, which I've done. It's just the standard file downloaded with the rest of htmlarea 2.03, without any other modifications.

I'd be interested to know the details of the mod, in case I need to use it in a different project.

Let me know if you need any other files.

Thanks again,

Martin
Attachments: editor.js (45.8 KB)


Martin_Edney
Novice

Feb 15, 2005, 2:25 AM


Views: 7916
Re: [Martin_Edney] Problem with utf-8 ( becomes £)

Luis,

Have you forgotten your offer of help with this problem, or have you been too busy? Sorry to chase you, but lots of people are moaning at me because they can't currently use the application, so I'd like to get this one fixed soon.

Thanks,

Martin


Luis
Veteran

Feb 15, 2005, 3:24 PM


Views: 7906
Re: [Martin_Edney] Problem with utf-8 ( becomes £)

Hi Martin:

I've not forgotten. It happens I've been sick in bed for the last week. I'll try to do it as soon as I feel better.

Greetings


Don't give up!!
http://webstationone.com/test/htmlarea