c# - FileIO.WriteTextAsync(file, text) 使用什么编码?

标签 c# windows-8 windows-runtime msdn

Windows.Storage.FileIo.WriteTextAsync 方法有两个重载,有和没有文本编码。

然而,MSDN pages该方法的(主页或任一重载页面)未指定没有编码参数的方法使用的编码。

那么默认使用什么编码呢?

其他问题:类似这样的内容可能在某处 中有记录。那么如何从MSDN中查找相关资料呢?它是按照某种我看不到的模式组织的吗?

最佳答案

看一下带编码参数的重载方法:

Remarks

This method attempts to automatically detect the encoding of a file based on the presence of byte order marks. If an encoding cannot be detected, the encoding specified by the caller is used.

这就是第一种方法在没有最后一句话的情况下如何工作:

This method attempts to automatically detect the encoding of a file based on the presence of byte order marks.

如果无法检测到编码,Encoding.Default Property被使用。

关于c# - FileIO.WriteTextAsync(file, text) 使用什么编码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18608357/

相关文章:

c++ - 在 Windows 8 上使用 Media Engine 播放音乐

javascript - 由于搜索尚未运行和激活时如何调试应用程序

windows - x :Uid generator for Windows 8 projects

c# - GMail + C# + Web.Config : Send Mail Works Programmatically, 使用 Web.Config 值引发异常

c# - 如何从 WPF 应用程序中链接到我的 PayPal 捐赠页面?

c# - 为什么需要使用 "this"(有些啧啧)

node.js - SailsJS 安装 MongoDB 时出错(windows 8 x64)

c# - 如何从 ListView 中的模板化数据中获取 UIElement?

c# - 页面中的 WinRT Z 索引

c# - 添加到 session ASP.NET C#