开发者

Incorporating ISO 8859-1 Symbols / foreign languages into a WinForms application

I have a function that finds any ISO 8859-1 symbol within a given string, and tries converting it to its proper meaning. However, I get question marks instead where I'd like actual values lik开发者_如何学Goe: ÿ é æ etc.

Can you point me in the right direction on how to properly handle foreign/unique symbols?


From the wording of your question, it sounds like you are attempting to identify byte values in a string and then convert them - this won't work. Strings are composed of characters and each character can consist of more than one byte (depending on the encoding). In other words, the conversion from a stream of bytes to a human-readable string is already performed by the time you access a string.

Have a look at the System.Text.Encoding class. If you really do want to convert a byte stream from one encoding to another, try System.Text.Encoding.Convert().

But it would be nice to know more details about your specific task so that people can give you a more precise answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜