Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic encoding (Read 2524 times)
DWorker
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Aug 15th, 2006
encoding
Aug 15th, 2006 at 4:33pm
Print Post  
I want to encode with Unicode character set. How to do it?
For example text in boxes I want to write on Japanese language.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: encoding
Reply #1 - Aug 15th, 2006 at 5:18pm
Print Post  
I guess you must specify a Font that contains Japanese glyphs, and probably set its "character set" attribute. Open the font editor in the VS property grid - you will see the character sets supported by a font in the combo box at the lower right corner.

Stoyan
  
Back to top
 
IP Logged
 
DWorker
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Aug 15th, 2006
Re: encoding
Reply #2 - Aug 15th, 2006 at 7:34pm
Print Post  
I'm defining my question more exactly. XmlWriter and XmlReader works with xml file. I don't understand how to initialize the control and store it into the xml file using "UTF-8" character set (I mean <?xml version="1.0" encoding="UTF-8"?>). When I'm trying to do it now it stores it with "Windows-1251" character set.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: encoding
Reply #3 - Aug 16th, 2006 at 5:21am
Print Post  
Hi,

Set XmlWriter.Options.WriteXMLDecl = false. Create a System.Xml.XmlWriter object and use it to write your own xml declaration tag. Then call the overloaded Write method that takes a System.Xml.XmlWriter parameter to serialize the diagram into the XML document.

Stoyan
  
Back to top
 
IP Logged
 
DWorker
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Aug 15th, 2006
Re: encoding
Reply #4 - Aug 17th, 2006 at 8:47am
Print Post  
Hello Stoyo!
You are not right. XmlWriter.Options.WriteXMLDecl = false - makes no sence.....
Look on disassemlered code of mindFusion:
public void Write(string fileName)
{
     XmlTextWriter writer1 = new XmlTextWriter(fileName, Encoding.Default);
     writer1.Formatting = Formatting.Indented;
     this.Write(writer1);
     writer1.Close();
}
and
public void Write(Stream stream)
{
     XmlTextWriter writer1 = new XmlTextWriter(stream, Encoding.Default);
     writer1.Formatting = Formatting.Indented;
     this.Write(writer1);
}
------------------------------------------------------------
As you see Here is Encoding.Default, but I need UTF-8. That is why only Write(XmlWriter writer) is suitable, where Encoding.UTF8 should be specified. Thanks for the idea.
[ftp][/ftp]
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint