help with encodings

Discussion in 'ASP .Net' started by greg, Jan 10, 2006.

  1. greg

    greg Guest

    Hi
    never felt so stupid before

    I have a file which is basically ascii except for few hexFA (250) bytes
    (so if you look at it in notepad it looks readable and those 250 displayed
    like ú
    the reason they use them as escapes for some sort of compression
    ok
    if I read this file in using StreamReader all those special guys disappear
    fine i thought I am still smart so I read it in as byte array
    of course after that I still need to convert it to string to use c# IndexOf
    on that stupid ú
    UTF8 encoding throws it out
    Ascii (when converting to chars[] makes it ?

    question
    how do i get nice c# String which will still contain something out of band
    for ascii chars
    but still be a c# String (which we all love and know or at least that's what
    I always thought)

    Thanks
    GSL
    greg, Jan 10, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Caterpillar

    fsm state encodings

    Caterpillar, Feb 10, 2006, in forum: VHDL
    Replies:
    1
    Views:
    580
  2. Per Bolmstedt
    Replies:
    0
    Views:
    425
    Per Bolmstedt
    Mar 3, 2004
  3. Roedy Green

    new CharSet encodings

    Roedy Green, Jul 30, 2003, in forum: Java
    Replies:
    2
    Views:
    724
    Paul Rowe
    Aug 7, 2003
  4. Electric Natcho

    Java, Sql Server & encodings

    Electric Natcho, Dec 1, 2003, in forum: Java
    Replies:
    1
    Views:
    1,078
    Anton Spaans
    Dec 1, 2003
  5. A_H
    Replies:
    3
    Views:
    896
    Gary Herron
    May 20, 2008
Loading...

Share This Page