Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Text encoding problem in imagemap mode (Read 2936 times)
oakenshield
YaBB Newbies
*
Offline



Posts: 19
Location: France
Joined: Sep 21st, 2007
Text encoding problem in imagemap mode
Feb 25th, 2008 at 10:51am
Print Post  
Hi,

After loading an XML file in imagemap mode, I have the following text encoding problem : some characters in nodes' text like accents (my application is in French) are changed because the text seems to be converted in UTF8 (well, I think it's UTF8 ).

For instance, the word "Supérieur" is displayed "Supérieur".

I don't have this problem if I load the XML file in applet mode.

Is there anything to do to fix this ? Can I convert nodes' text into another encoding system for example ?

Thanks in advance !
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Text encoding problem in imagemap mode
Reply #1 - Feb 25th, 2008 at 12:42pm
Print Post  
Hi,

Create your own XmlDocument and set its encoding as shown in the "XmlDeclaration.Encoding" sample in the MSDN library. Next use the void SaveToXml(XmlDocument document) method to save the flowchart to the document, and finally XmlDocument.Save(fileName) to save it to a file.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
oakenshield
YaBB Newbies
*
Offline



Posts: 19
Location: France
Joined: Sep 21st, 2007
Re: Text encoding problem in imagemap mode
Reply #2 - Feb 26th, 2008 at 8:22am
Print Post  
Thanks for this reply.

The problem is that I save diagram data from client side with saveToString method, and I want to load XML files in imagemap & applet modes...

I finally managed to solve my problem with imagemap mode by converting systematically nodes' content from UTF8 to Unicode before display. That's the better solution I can see for the moment.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Text encoding problem in imagemap mode
Reply #3 - Feb 26th, 2008 at 9:53am
Print Post  
Perhaps we should add an "encoding" parameter to the xml methods. Otherwise, the control just uses the default encoding set by the Java and .NET XML APIs.

Stoyan
  
Back to top
 
IP Logged
 
oakenshield
YaBB Newbies
*
Offline



Posts: 19
Location: France
Joined: Sep 21st, 2007
Re: Text encoding problem in imagemap mode
Reply #4 - Feb 27th, 2008 at 12:39pm
Print Post  
Yes, I think an encoding parameter should be obviously useful for users developping applications in accented languages...
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint