
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
	<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head><card id="MainCard" title="&#x6B22;&#x8FCE;&#x5149;&#x4E34;"><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a><br/>&nbsp;</p><p><b>&#x6807;&#x9898;&#x3A;</b> &#x43;&#x23;&#x20;&#x42;&#x69;&#x6E;&#x61;&#x72;&#x79;&#x57;&#x72;&#x69;&#x74;&#x65;&#x72;&#x548C;&#x53;&#x74;&#x72;&#x65;&#x61;&#x6D;&#x57;&#x72;&#x69;&#x74;&#x65;&#x72;&#x4E00;&#x4E9B;&#x533A;&#x522B;</p><p><b>&#x4F5C;&#x8005;&#x3A;</b> &#x64;&#x6E;&#x61;&#x77;&#x6F;</p><p><b>&#x65E5;&#x671F;&#x3A;</b> &#x32;&#x30;&#x30;&#x39;&#x2D;&#x30;&#x38;&#x2D;&#x31;&#x30;&#x20;&#x31;&#x30;&#x3A;&#x34;&#x39;&#x20;&#x41;&#x4D;</p><p><b>&#x5206;&#x7C7B;&#x3A;</b> <a href="wap.asp?do=showLog&amp;cateID=5">&#x57;&#x65;&#x62;&#x7F16;&#x7A0B;</a></p><p><b>&#x5185;&#x5BB9;&#x3A;</b> 1.BinaryWriter&#x751F;&#x6210;&#x7684;&#x6587;&#x4EF6;&#x6CA1;&#x6709;BOM&#xFF0C;StreamWriter&#x751F;&#x6210;&#x7684;&#x6587;&#x4EF6;&#x6709;BOM<br/>&#x590D;&#x5236;&#x5185;&#x5BB9;&#x5230;&#x526A;&#x8D34;&#x677F; &#x7A0B;&#x5E8F;&#x4EE3;&#x7801;using (FileStream fs = File.Cr&#101;ate(@&#34;c:\222.txt&#34;))<br/>{<br/>&nbsp;&nbsp;&nbsp;&nbsp;using (BinaryWriter bw = new BinaryWriter(fs, Encoding.Unicode))<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bw.Write(&#39;&#x6587;&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>}<br/>//&#x7ED3;&#x679C;&#xFF1A;87 65<br/>&#x590D;&#x5236;&#x5185;&#x5BB9;&#x5230;&#x526A;&#x8D34;&#x677F; &#x7A0B;&#x5E8F;&#x4EE3;&#x7801;using (FileStream fs = File.Cr&#101;ate(@&#34;c:\111.txt&#34;))<br/>{<br/>&nbsp;&nbsp;&nbsp;&nbsp;using (StreamWriter sw = new StreamWriter(fs, Encoding.Unicode))<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sw.Write(&#39;&#x6587;&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>}<br/>//&#x7ED3;&#x679C;&#xFF1A;FF FE 87 65<br/>2.BinaryWriter&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x5199;&#x5165;2&#x5B57;&#x8282;&#x6709;&#x7B26;&#x53F7;&#x6574;&#x6570;&#xFF0C;StreamWriter&#x4E0D;&#x652F;&#x6301;<br/>&#x590D;&#x5236;&#x5185;&#x5BB9;&#x5230;&#x526A;&#x8D34;&#x677F; &#x7A0B;&#x5E8F;&#x4EE3;&#x7801;using (FileStream fs = File.Cr&#101;ate(@&#34;c:\333.txt&#34;))<br/>{<br/>&nbsp;&nbsp;&nbsp;&nbsp;using (BinaryWriter bw = new BinaryWriter(fs, Encoding.Unicode))<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bw.Write((short)&#39;&#x6587;&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>}<br/>//&#x7ED3;&#x679C;&#xFF1A;87 65<br/>3.BinaryWriter&#x4E0D;&#x652F;&#x6301;&#x8BBE;&#x7F6E;&#x5B57;&#x8282;&#x987A;&#x5E8F;&#xFF0C;StreamWriter &#x652F;&#x6301;&#x8BBE;&#x7F6E;&#x5B57;&#x8282;&#x987A;&#x5E8F;<br/>&#x590D;&#x5236;&#x5185;&#x5BB9;&#x5230;&#x526A;&#x8D34;&#x677F; &#x7A0B;&#x5E8F;&#x4EE3;&#x7801;using (FileStream fs = File.Cr&#101;ate(@&#34;c:\444.txt&#34;))<br/>{<br/>&nbsp;&nbsp;&nbsp;&nbsp;using (BinaryWriter bw = new BinaryWriter(fs, new UnicodeEncoding(true, true)))<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bw.Write((short)&#39;&#x6587;&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>}<br/>//&#x7ED3;&#x679C;&#xFF1A;87 65<br/>&#x590D;&#x5236;&#x5185;&#x5BB9;&#x5230;&#x526A;&#x8D34;&#x677F; &#x7A0B;&#x5E8F;&#x4EE3;&#x7801;using (FileStream fs = File.Cr&#101;ate(@&#34;c:\555.txt&#34;))<br/>{<br/>&nbsp;&nbsp;&nbsp;&nbsp;using (StreamWriter sw = new StreamWriter(fs, new UnicodeEncoding(true, true)))<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sw.Write(&#39;&#x6587;&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>}<br/>//&#x7ED3;&#x679C;&#xFF1A;FE FF 65 87<br/>&#x4ECE;&#x6D4B;&#x8BD5;&#x7ED3;&#x679C;&#x53EF;&#x77E5;BinaryWriter&#x90FD;&#x662F;&#x6309;little-endian&#x5B57;&#x8282;&#x987A;&#x5E8F;&#x5199;&#x5165;&#x7684;&#xFF0C;&#x5E76;&#x4E14;&#x4E0D;&#x63D0;&#x4F9B;&#x5B57;&#x8282;&#x987A;&#x5E8F;&#x6807;&#x8BB0;(BOM)&#xFF1B;StreamWriter&#x53EF;&#x8BBE;&#x7F6E;&#x5199;&#x5165;&#x7684;&#x5B57;&#x8282;&#x987A;&#x5E8F;&#xFF0C;&#x4EE5;&#x53CA;&#x662F;&#x5426;&#x63D0;&#x4F9B;&#x5B57;&#x8282;&#x987A;&#x5E8F;&#x6807;&#x8BB0;&#x3002;</p><p> + <a href="#CommentCard">&#x67E5;&#x770B;&#x5F53;&#x524D;&#x65E5;&#x5FD7;&#x8BC4;&#x8BBA;</a> (0)</p><p>&nbsp;<br/><br/><a href="wap.asp?do=Login">&#x767B;&#x5F55;</a></p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.629&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card><card id="postCommentCard"><p><b>&#x6807;&#x9898;&#x3A;</b> <a href="#MainCard">&#x43;&#x23;&#x20;&#x42;&#x69;&#x6E;&#x61;&#x72;&#x79;&#x57;&#x72;&#x69;&#x74;&#x65;&#x72;&#x548C;&#x53;&#x74;&#x72;&#x65;&#x61;&#x6D;&#x57;&#x72;&#x69;&#x74;&#x65;&#x72;&#x4E00;&#x4E9B;&#x533A;&#x522B;</a></p><p><br/>你没有权限发表评论</p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.629&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card><card id="CommentCard"><p>&#x6682;&#x65E0;&#x8BC4;&#x8BBA;</p><p><a href="#MainCard">&#x8FD4;&#x56DE;</a></p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.629&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card>
</wml>
