<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	「Step to UEFI (54） &#8212;&#8211; EFI_SIMPLE_FILE_SYSTEM_PROTOCOL 写文件」的评论	</title>
	<atom:link href="https://www.lab-z.com/esptest/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lab-z.com/esptest/</link>
	<description></description>
	<lastBuildDate>Fri, 20 Sep 2024 10:52:36 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		评论者：ziv2013		</title>
		<link>https://www.lab-z.com/esptest/#comment-298042</link>

		<dc:creator><![CDATA[ziv2013]]></dc:creator>
		<pubDate>Mon, 29 Aug 2022 11:55:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-298042</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://www.lab-z.com/esptest/#comment-298041&quot;&gt;han&lt;/a&gt;。

一般来说，不同编码会在 TXT 头部写入几个字符。对于UTF-16 LE)编码来说需要写入 0xFF, 0xFE 

你可以试试。参考： https://www.cnblogs.com/lkpp/p/save_text_unicode.html]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://www.lab-z.com/esptest/#comment-298041">han</a>。</p>
<p>一般来说，不同编码会在 TXT 头部写入几个字符。对于UTF-16 LE)编码来说需要写入 0xFF, 0xFE </p>
<p>你可以试试。参考： <a href="https://www.cnblogs.com/lkpp/p/save_text_unicode.html" rel="nofollow ugc">https://www.cnblogs.com/lkpp/p/save_text_unicode.html</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：han		</title>
		<link>https://www.lab-z.com/esptest/#comment-298041</link>

		<dc:creator><![CDATA[han]]></dc:creator>
		<pubDate>Mon, 29 Aug 2022 03:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-298041</guid>

					<description><![CDATA[我使用CHAR8写txt文件，但是文件出现了乱码，当时的编码为UTF-6LE，另存为时选择utf-8后再写入就不会乱码，请问怎样在程序中设置txt默认编码形式呢？]]></description>
			<content:encoded><![CDATA[<p>我使用CHAR8写txt文件，但是文件出现了乱码，当时的编码为UTF-6LE，另存为时选择utf-8后再写入就不会乱码，请问怎样在程序中设置txt默认编码形式呢？</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：ziv2013		</title>
		<link>https://www.lab-z.com/esptest/#comment-120742</link>

		<dc:creator><![CDATA[ziv2013]]></dc:creator>
		<pubDate>Wed, 26 May 2021 03:19:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-120742</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://www.lab-z.com/esptest/#comment-120740&quot;&gt;kkk&lt;/a&gt;。

我看了一下 write 定义如下，就是说它写的是一个 buffer ，如果你buffer 里面是 unicode 的，那么结果就是 unicode 的内容；反之就是 ascii 格式的，

typedef
EFI_STATUS
(EFIAPI *EFI_FILE_WRITE)(
  IN EFI_FILE_PROTOCOL        *This,
  IN OUT UINTN                *BufferSize,
  IN VOID                     *Buffer
  );]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://www.lab-z.com/esptest/#comment-120740">kkk</a>。</p>
<p>我看了一下 write 定义如下，就是说它写的是一个 buffer ，如果你buffer 里面是 unicode 的，那么结果就是 unicode 的内容；反之就是 ascii 格式的，</p>
<p>typedef<br />
EFI_STATUS<br />
(EFIAPI *EFI_FILE_WRITE)(<br />
  IN EFI_FILE_PROTOCOL        *This,<br />
  IN OUT UINTN                *BufferSize,<br />
  IN VOID                     *Buffer<br />
  );</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：kkk		</title>
		<link>https://www.lab-z.com/esptest/#comment-120740</link>

		<dc:creator><![CDATA[kkk]]></dc:creator>
		<pubDate>Wed, 26 May 2021 01:10:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-120740</guid>

					<description><![CDATA[我会再回复你

1. EFI_FILE_PROTOCOL.Write 函数使用
2.不是Unicode而是ASCII Write
你有办法吗？]]></description>
			<content:encoded><![CDATA[<p>我会再回复你</p>
<p>1. EFI_FILE_PROTOCOL.Write 函数使用<br />
2.不是Unicode而是ASCII Write<br />
你有办法吗？</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：kkk		</title>
		<link>https://www.lab-z.com/esptest/#comment-120735</link>

		<dc:creator><![CDATA[kkk]]></dc:creator>
		<pubDate>Wed, 26 May 2021 00:53:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-120735</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://www.lab-z.com/esptest/#comment-120723&quot;&gt;ziv2013&lt;/a&gt;。

我会再回复你

1. EFI_FILE_PROTOCOL.Write 函数使用
2.不是Unicode而是ASCII Write
你有办法吗？]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://www.lab-z.com/esptest/#comment-120723">ziv2013</a>。</p>
<p>我会再回复你</p>
<p>1. EFI_FILE_PROTOCOL.Write 函数使用<br />
2.不是Unicode而是ASCII Write<br />
你有办法吗？</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：kkk		</title>
		<link>https://www.lab-z.com/esptest/#comment-120729</link>

		<dc:creator><![CDATA[kkk]]></dc:creator>
		<pubDate>Wed, 26 May 2021 00:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-120729</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://www.lab-z.com/esptest/#comment-120723&quot;&gt;ziv2013&lt;/a&gt;。

您知道如何用 Ascii 取代 FILE Write 的 Unicode ？ 从UEFI]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://www.lab-z.com/esptest/#comment-120723">ziv2013</a>。</p>
<p>您知道如何用 Ascii 取代 FILE Write 的 Unicode ？ 从UEFI</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：ziv2013		</title>
		<link>https://www.lab-z.com/esptest/#comment-120723</link>

		<dc:creator><![CDATA[ziv2013]]></dc:creator>
		<pubDate>Tue, 25 May 2021 23:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-120723</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://www.lab-z.com/esptest/#comment-120561&quot;&gt;kkk&lt;/a&gt;。

不明白你的问题，你遇到什么具体错误了么？]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://www.lab-z.com/esptest/#comment-120561">kkk</a>。</p>
<p>不明白你的问题，你遇到什么具体错误了么？</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：kkk		</title>
		<link>https://www.lab-z.com/esptest/#comment-120561</link>

		<dc:creator><![CDATA[kkk]]></dc:creator>
		<pubDate>Tue, 25 May 2021 08:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-120561</guid>

					<description><![CDATA[使用 UnicodeStrToAsciStr 函数
File write Ascii text
知道方法吗？]]></description>
			<content:encoded><![CDATA[<p>使用 UnicodeStrToAsciStr 函数<br />
File write Ascii text<br />
知道方法吗？</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：李		</title>
		<link>https://www.lab-z.com/esptest/#comment-97568</link>

		<dc:creator><![CDATA[李]]></dc:creator>
		<pubDate>Fri, 18 Dec 2020 06:17:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-97568</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://www.lab-z.com/esptest/#comment-97552&quot;&gt;ziv2013&lt;/a&gt;。

非常感谢，我看device path 的确是不同的，可以通过device path来区分是for shell U盘 还是SSD的。]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://www.lab-z.com/esptest/#comment-97552">ziv2013</a>。</p>
<p>非常感谢，我看device path 的确是不同的，可以通过device path来区分是for shell U盘 还是SSD的。</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：ziv2013		</title>
		<link>https://www.lab-z.com/esptest/#comment-97552</link>

		<dc:creator><![CDATA[ziv2013]]></dc:creator>
		<pubDate>Fri, 18 Dec 2020 02:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=3251#comment-97552</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://www.lab-z.com/esptest/#comment-97549&quot;&gt;李&lt;/a&gt;。

具体你的目标我不太清楚，不过我觉得你可以试试查 protocol 所在的 handle，然后从 Handle 查设备类型，就可以得知是 SATA 还是 USB 这样的。但是如果你同时插上2个 U盘，这样的方法又没有办法继续区分了。另外，之前的 Microsoft 的一个 UEFI 截屏的项目是通过要求你在目标的 ESP 分区上放置特定名称的文件来实现区分的，你可以参考一下。]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://www.lab-z.com/esptest/#comment-97549">李</a>。</p>
<p>具体你的目标我不太清楚，不过我觉得你可以试试查 protocol 所在的 handle，然后从 Handle 查设备类型，就可以得知是 SATA 还是 USB 这样的。但是如果你同时插上2个 U盘，这样的方法又没有办法继续区分了。另外，之前的 Microsoft 的一个 UEFI 截屏的项目是通过要求你在目标的 ESP 分区上放置特定名称的文件来实现区分的，你可以参考一下。</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
