Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

fckeditor problem: can't recognize french character é

Hi, I am using fckeditor to replace the textarea in my application. I also has a spell checking software (from another source) connected with it. However, I found the fckeditor has some problem when spell checking french character é. For example, I put french word " Résistance " in the fckeditor, and

My code is like:

function setContent(myTextarea)
{
var oEditor = FCKeditorAPI.GetInstance(myTextarea);

document.getElementsByName(myTextarea)[0].value= oEditor.GetXHTML(true);

confirm(document.getElementsByName(myTextarea)[0].value);
}

The output by confirm(document.getElementsByName(myTextarea)[0].value) will be

"Résistance"

It looks like every é will be interpreted as "é"

So what's wrong? Thanks
0
ly_uwo
Asked:
ly_uwo
  • 3
  • 2
1 Solution
 
maisonlapriseCommented:
The &eacute is the html entitie for é. There is one for every special character. For example è would be &egrave, à would be &agrave.

If you were working in PHP , all you had to do is use the html_entities_decode() function to transform the &eacute into 'é'.

I don't really know how to solve your problem though.
0
 
ly_uwoAuthor Commented:
I am using jsp with javascript, so any specific functions for that?
0
 
maisonlapriseCommented:
Another solution is to change the character set used in your webpage :

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

The UTF-8 charset contains about every character possible.
0
 
ly_uwoAuthor Commented:
Sorry it won't work. I think it is because of the fckeditor problem. My html page can show those french special characters fine. However, in the content of textarea, if using fckeditor, the problem appears. In fact the outlook of the textarea is good, just when you try to spell check the content, it won't give you the right result. That's why I use javascript confirm funciton to output the value and see that the spell checker is trying to check "R&eacute;sistance", not Résistance
0
 
ly_uwoAuthor Commented:
though I found solution in another panel. you still give me some idea. thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now