views:

251

answers:

2

How can I make the textbox contents to ANSI format when paste in C#?

A: 

.NET uses Unicode for strings everywhere internally, including for the forms controls. So I think you're real question is, given a byte-array, how do I convert that byte-array into Unicode using a desired source encoding ("ANSI" of some flavor)?

System.Text.Encoding has useful classes here.

EricLaw -MSFT-
A: 

Try convert the Unicode to Ansi using FormatProvider. Maybe can is a solution?

pho3nix