How to insert ASCII 233 in text string?

I'm using Wingdings font and need an ASCII 233 char for an arrow. How can I represent an ASCII 233 char? Currently I have the actual ASCII 233 char in the string, but I don't like having weird characters in my strings. I think there's some simple way to specify a hex value for the character in a string.
deleydAsked:
Who is Participating?
 
wdosanjosConnect With a Mentor Commented:
Something like this:

string yourstr = "MyCharacters\u00E9AreHere";

2.4.1 Unicode character escape sequences
http://msdn.microsoft.com/en-us/library/aa664669%28v=VS.71%29.aspx
0
 
deleydAuthor Commented:
OK how about if I want an ASCII string instead of a Unicode string?
0
 
deleydAuthor Commented:
(actually I think the code text file is formatted as UTF-8)
0
 
wdosanjosCommented:
Strings in .NET are always Unicode.  How you write the file defines the character encoding.  For example:

var writer = new StreamWriter(@"C:\temp\myfile.txt", false, System.Text.Encoding.ASCII); // ASCII file

var writer = new StreamWriter(@"C:\temp\myfile.txt", false, System.Text.Encoding.UTF8); // UTF8 file

I hope this helps.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.