<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>s51517765</author_name>
  <author_url>https://blog.hatena.ne.jp/s51517765/</author_url>
  <blog_title>プログラミング素人のはてなブログ</blog_title>
  <blog_url>https://s51517765.hatenadiary.jp/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>読書</anon>
  </categories>
  <description>文字コードを正しく判別しないと文字化けする C#でテキストファイル(.txt)からテキストを読み込むときに文字コードを正しく判別できないことによって文字化けすることがあります。 多くのテキストファイルはBOM（Byte Order Mark）という、先頭の数Byteに文字コード指定が記述されています。この仕組みを利用してDOBONに文字コードの識別サンプルコードがあります。 dobon.net public static System.Text.Encoding DetectEncodingFromBOM(byte[] bytes) { if (bytes.Length &lt; 2) { retu…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fs51517765.hatenadiary.jp%2Fentry%2F2021%2F08%2F16%2F073000&quot; title=&quot;テキストファイルの文字コードを判別する - プログラミング素人のはてなブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://m.media-amazon.com/images/I/51M4td-sVGL._SL500_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-08-16 07:30:00</published>
  <title>テキストファイルの文字コードを判別する</title>
  <type>rich</type>
  <url>https://s51517765.hatenadiary.jp/entry/2021/08/16/073000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
