F
FrzzMan
There's not much here, my question is the subject...
FrzzMan said:This is the code that expose the "bug" (I think)
string Data = "UTF-8 string"; // <-- Insert some *long* UTF-8 string
byte[] DataBytes = System.Text.Encoding.UTF8.GetBytes(Data);
string BackConvert = System.Text.Encoding.UTF8.GetString(DataBytes);
System.Console.WriteLine(Data == BackConvert);
System.IO.StreamWriter File = System.IO.File.CreateText("test.txt");
File.Write(Data + "\n" + BackConvert);
File.Close();
There's not much here, my question is the subject...
You should not do this - "my question is the subject..."
Andreas Håkansson and n! will kill you for such posting.
See my post on 16/04.
Of course there is always possibility that n! and AH reaction to my post was
personal.
- never put not ascii-chars into source files!!! (better load it from some
resource-files)
I did save my source as UTF-8- if you need to do this, then save as UNICODE!
FrzzMan said:Can you show me how to do this? In fact, I have an XML file that I
want to hardcode to the app, but I have to manually build a string to
produce the XML content (escape every special strings... etc...), I've
just switched to C#, I have much exp with PHP tho![]()
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.