Convert unicode string to ansi

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Clay

    #1

    Convert unicode string to ansi

    I need to convert a unicode string to an ansi string. This should not be
    difficult but I simply cannot find a way to do this. Anyone?

  • Herfried K. Wagner [MVP]

    #2
    Re: Convert unicode string to ansi

    "Clay" <Clay@discussio ns.microsoft.co m> schrieb:[color=blue]
    >I need to convert a unicode string to an ansi string. This should not be
    > difficult but I simply cannot find a way to do this. Anyone?[/color]

    For Windows ANSI:

    \\\
    Dim b() As Byte = System.Text.Enc oding.Default.G etBytes(MyStrin g)
    ///

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • Clay

      #3
      Re: Convert unicode string to ansi

      Thanl you!!! Now I'm not sure what the client needs though, so I gave them
      every file format including, uicode, ansi, utf7, utf8, but thank you!

      "Herfried K. Wagner [MVP]" wrote:
      [color=blue]
      > "Clay" <Clay@discussio ns.microsoft.co m> schrieb:[color=green]
      > >I need to convert a unicode string to an ansi string. This should not be
      > > difficult but I simply cannot find a way to do this. Anyone?[/color]
      >
      > For Windows ANSI:
      >
      > \\\
      > Dim b() As Byte = System.Text.Enc oding.Default.G etBytes(MyStrin g)
      > ///
      >
      > --
      > M S Herfried K. Wagner
      > M V P <URL:http://dotnet.mvps.org/>
      > V B <URL:http://classicvb.org/petition/>
      >[/color]

      Comment

      Working...