Solved

fckeditor problem: can't recognize french character é

Posted on 2006-11-20
5
348 Views
Last Modified: 2008-02-01
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
Comment
Question by:ly_uwo
  • 3
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
maisonlaprise earned 500 total points
ID: 17982549
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
 

Author Comment

by:ly_uwo
ID: 17982577
I am using jsp with javascript, so any specific functions for that?
0
 
LVL 2

Expert Comment

by:maisonlaprise
ID: 17982777
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
 

Author Comment

by:ly_uwo
ID: 17983017
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
 

Author Comment

by:ly_uwo
ID: 17988454
though I found solution in another panel. you still give me some idea. thanks
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now