<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>johnyuan2000</author_name>
  <author_url>https://blog.hatena.ne.jp/johnyuan2000/</author_url>
  <blog_title>司南魚Legacy</blog_title>
  <blog_url>https://johnyuan2000.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>http://yoshimov.com/tips/ruby-csv-readwrite/読み込み時に、ファイルの文字コードを指定して開きます。 cp932は、WindowsのShift JISコードです。 またその際に、内部的に利用したい文字コードを指定しておきます。 最近はUTF-8でソースを書くのが一般的になってきたので、 UTF-8にしておくと何かと便利です。require 'csv' reader = CSV.open(&quot;hoge.csv&quot;, &quot;rt:cp932:utf-8&quot;) reader.each do |row| puts row[1] end 書き込みは正しくファイルを閉じるた…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjohnyuan2000.hatenadiary.org%2Fentry%2F20160306%2F1457221855&quot; title=&quot;ruby CSV encode cp932 Windows Shift JIS - 司南魚Legacy&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-03-06 08:50:55</published>
  <title>ruby CSV encode cp932 Windows Shift JIS</title>
  <type>rich</type>
  <url>https://johnyuan2000.hatenadiary.org/entry/20160306/1457221855</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
