如何确定字符串是Unicode还是Not [英] How to determine a string is Unicode or Not

查看:77
本文介绍了如何确定字符串是Unicode还是Not的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在vb.net中确定字符串是否为Unicode

how to determine a string is Unicode or Not in vb.net

推荐答案

.net中的所有字符串都是Unicode。 ASCII是Unicode的一个子集(有点sorta)。如果您愿意,可以迭代字符以查看是否有任何字符超出ASCII范围。
All strings in .net are Unicode. ASCII is a subset of Unicode (kinda sorta). You could iterate the characters to see if any are outside the ASCII range if you like.


没有100%可靠的方法来执行此操作。你可以对编码做出有根据的猜测,就是它。
There is no 100% reliable way to do it. You can make an educated guess at the encoding, that's about it.


这篇关于如何确定字符串是Unicode还是Not的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆