<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[NetDraw的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/NetDraw</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; NetDraw]]></copyright><item><title><![CDATA[UTF8字符串的判断]]></title><link>https://blog.youkuaiyun.com/NetDraw/article/details/48340009</link><guid>https://blog.youkuaiyun.com/NetDraw/article/details/48340009</guid><author>NetDraw</author><pubDate>Thu, 10 Sep 2015 10:41:34 +0800</pubDate><description><![CDATA[UTF8字符串的判断

 最近验证一个技术问题，中间遇到了自动判断给定字符串是否是UTF8字符串的问题，现将用到的相关信息，整理下来。


首先要明白UTF8其实是对UNICODE数值的一种编码方式，UTF8编码最多可以使用6个字节最少使用1个字节表示一个字符。每一个字节都有一定的标志位，可以通过这些标志位进行判读。



1字节 0xxxxxxx 
2字节 110xxxxx ]]></description><category></category></item></channel></rss>