How to insert ASCII 233 in text string?

Posted on 2011-10-06
Last Modified: 2012-06-22
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.
Question by:deleyd
    LVL 23

    Accepted Solution

    Something like this:

    string yourstr = "MyCharacters\u00E9AreHere";

    2.4.1 Unicode character escape sequences

    Author Comment

    OK how about if I want an ASCII string instead of a Unicode string?

    Author Comment

    (actually I think the code text file is formatted as UTF-8)
    LVL 23

    Expert Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    794 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now