<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:media="http://search.yahoo.com/mrss/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UTF-8 - 四号程序员</title>
	<atom:link href="https://www.coder4.com/archives/tag/utf-8/feed" rel="self" type="application/rss+xml" />
	<link>https://www.coder4.com</link>
	<description>Keep It Simple and Stupid</description>
	<lastBuildDate>Mon, 23 Sep 2013 06:00:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>C++中，解析UTF-8字符的位置。</title>
		<link>https://www.coder4.com/archives/3986</link>
					<comments>https://www.coder4.com/archives/3986#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Mon, 23 Sep 2013 06:00:08 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[UTF-8]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=3986</guid>

					<description><![CDATA[在C++的char*以及string中，使用的是字节流编码，即sizeof(char) == 1。 也就是说，C++是不去分字符的编码的。 而一个合法UTF8的字符长度可能为1～4位。 现在假设一串输入为UTF8编码，如何能准确的定位到每个UTF8字符的“CharPoint”，而不会错误的分割字符呢？ 参考这个页面：http://www.nubaria.com/en/blog/?p=289 可以改造出下面的函数： const unsigned char kFirs[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/3986/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Python写UTF8文件，UE、记事本打开依然乱码的问题</title>
		<link>https://www.coder4.com/archives/3835</link>
					<comments>https://www.coder4.com/archives/3835#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Fri, 01 Mar 2013 04:50:11 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[BOM]]></category>
		<category><![CDATA[UTF-8]]></category>
		<category><![CDATA[乱码]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=3835</guid>

					<description><![CDATA[现象：使用codecs打开文件，写入UTF-8文本，正常无错误。用vim打开正常，但记事本、UE等打开乱码。 原因：一般写文本时，默认是没有BOM头的，即编辑器不知道这个文本文件是神马编码，只能智能detect，这个detect有的弱有的强，比如UE、记事本就挂了，认为是ASCII格式的，于是就乱码了。 解决方法：如果为了编辑器打开正常，可以加入BOM编码。但一定要慎重，一旦加入后，头部会增加2~3个字节，如果程序再读取，显然会出错。这个如果使用UE编辑过PHP代码抓过狂的都应该懂得[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/3835/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
