Unicode in vb.net [closed]

江枫思渺然 提交于 2019-12-25 21:06:13

问题


How to use Unicode available in vb6 in vb.net?
Is there any equivalent of vb6 Unicode in vb.net??


回答1:


Are you using vbUnicode in order to convert a Byte Array to a String? Like the following?

StrConv(ByteArray, vbUnicode)

If so this is the .Net equivalent of that function

Dim theString as String = System.Text.Encoding.Unicode.GetString(ByteArray)



回答2:


All strings in .NET (and hence in VB.NET) are unicode. .NET also has libraries to output strings in different formats (see the System.Text.Encoding class and related classes). What exactly are you trying to do with unicode?




回答3:


VB 6 did not support Unicode, at least not directly. There were ways around it, but it was a royal pain in the rear. If you are asking does VB 6 support unicode like VB.NET, the answer is no.

If, instead, you are asking whether or not you can use something like code pages in VB.NET, the answer is an indirect yes, although I see no reason to jump through that hoop to support globalization/localization, as the paradigm has shifted.



来源:https://stackoverflow.com/questions/621333/unicode-in-vb-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!