Solved

fckeditor problem: can't recognize french character é

Posted on 2006-11-20
5
368 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

710 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