Results 1 to 3 of 3

Thread: UTF -8 encoding with Streamwriter destroys my character..[Resolved by dynamic_sysop]

  1. #1

    Thread Starter
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460

    UTF -8 encoding with Streamwriter destroys my character..[Resolved by dynamic_sysop]

    Good damn! I have searched my ass off because of this. When you use the streamreader you can use something like this

    "filepath", System.Text.Encoding.Default, that open a file with my default encoder ( ANSI ). But when i use streamwriter, i cannot choose which encoder i will write with.

    The streamwriter write files with UTF - 8 encoder, and that is messing my Swedish character up.

    Pleease! Is there anyone here that can give me some advice??
    Last edited by Libero; Apr 27th, 2004 at 04:41 AM.

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    like this you mean?
    VB Code:
    1. Dim sWriter As New IO.StreamWriter(New IO.FileStream("C:\some_path.txt", IO.FileMode.OpenOrCreate), System.Text.Encoding.Default)
    2. '/// do stuff to write your file here.

  3. #3

    Thread Starter
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460
    OHHH! MY GOD! ( sorry for screaming ) I thought this was some f*****g bug. Like i said, i have searched in the hole damn WWW to get this correct. And i posted my question here, and now the problem is solved.. dynamic_sysop i wish i could give you a beer. Yeah, i will PM you that. Thank you sooo much!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width