I have a form, where the textarea has fckeditor. It works great. But if I write some danish characters () in the other textfields, and push submit the characters disappear, but not in the fckeditor textarea, but all other fields. If I remove fckeditor it works fine.
Anyone who has an Idea
Anyone who has an Idea
RE: Losing danish characters
Did You find any solution on this?
I have the same problem with ver 2.3Beta and swedish characters.
~Klaus
RE: Losing danish characters
Because FCKeditor is programmet in UTF-8 charset, it led to the problem that the danish letters, æøå, couldn't be showed. Whenever the fckeditor.asp was included in the page, it simply excluded the characters. I have received many suggestions to the problem, but this is the one I used to solve my problem:
- I earlier got the advice to change all occurences of UTF-8 to iso-8859-1 in the FCKeditor code. I did this with SImple Search Replace and found over 114 places. But it didn't help.
- Then instead I tried to change alle my pages back to UTF-8, which made a lot of other places in my page go crazy. Other places where I've used danish letters.
- I then made these to methods, to convert æøå in every textfield or textarea to UTF-8 standard. But I found that there are to ways in writes the danish letters: "æ" og "æ", which I converterted to "æ".
The methods look like this in ASP:
Function convertChars(str)
str = Replace(str,"æ","æ")
str = Replace(str,"ø","ø")
str = Replace(str,"Ã¥","å")
str = Replace(str,"Æ","&Aelig;")
str = Replace(str,"Ø","Ø")
str = Replace(str,"Ã…","Å")
convertChars = str
End Function
Function convertNormalChars(str)
str = Replace(str,"æ","æ")
str = Replace(str,"ø","ø")
str = Replace(str,"å","å")
str = Replace(str,"Æ","&Aelig;")
str = Replace(str,"Ø","Ø")
str = Replace(str,"Å","Å")
convertNormalChars = str
End Function
Every time my CMS is edited and before it is saved to the database, I convert the letters to UTF-8, and then the problem is solved. If you look in the database, you will see that that's the exact same thing that FCKeditor does with the text inside the editor.
- But specific place, I had a need to save a reference to a specific file on the server in the database, but I realized that I couldn't use method 1. The reason is that the filename uses the æøå directly. Therefor I used method 2.
My page works perfectly now and also renders the danish letters perfectly. I am very greatful for all the help I got, which is why I share this solution. For hopefully some will find the solution usefull, and will not have to use many month to find this answer.
Kasper Pagels
RE: Losing danish characters
OK, thx för the great explanation.
I never got it to work so I switched to tinymce (http://tinymce.moxiecode.com) which is created by swed's så there it do work without any changes.
Maybe I give fckeditor another try...
RE: Losing danish characters
Good luck. Kasper.
RE: Losing danish characters
I have a similar problem.
My application involves traslation of texts in different languages.For this purpose,a popup is opened from the main window which opens the FCKeditor.The value entered in the editor is then sent back to the parent window textfield.However when I use danish or any other characters, they are replaced with their representation.For eg. 'æ' is replaced with 'æ'.When the editor is now opened again,this value 'æ' is again displayed as 'Atilde'.
How can I retain the original characters???
Pls help....Would really appreciate any help I can get.
Thanks..
RE: Losing danish characters
Plllls help!!!
RE: Losing danish characters
Hi
I had similar problems doing a project for a Polish company.
Somethign which helps was to change the 'charset'in the meta description.
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> (find which on is the correct one for Denmark)
I guess you're storing data in a dtabase, make sure also the server is configured properly with he correct set of characters. (I spent 4 hrs on this one)
Good luck
Remi