{"provider_url":"https://hatena.blog","blog_title":"make world","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Flittlebuddha.hatenadiary.org%2Fentry%2F20080523%2F1211525499\" title=\"Ruby \u3067\u81ea\u5bb6\u88fd\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304f 02 - make world\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["Ruby","YAML","CSV"],"title":"Ruby \u3067\u81ea\u5bb6\u88fd\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304f 02","provider_name":"Hatena Blog","version":"1.0","image_url":null,"blog_url":"https://littlebuddha.hatenadiary.org/","width":"100%","author_name":"littlebuddha","url":"https://littlebuddha.hatenadiary.org/entry/20080523/1211525499","type":"rich","published":"2008-05-23 15:51:39","author_url":"https://blog.hatena.ne.jp/littlebuddha/","height":"190","description":"\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u5909\u63db\u3055\u305b\u308b \u8aad\u307f\u8fbc\u307f\u3082\u3068\u306e CSV \u30d5\u30a1\u30a4\u30eb\u3068\u51fa\u529b\u5148\u306e SQL \u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u304c\u4e00\u81f4\u3057\u306a\u3044\u5834\u5408\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u5909\u63db\u3055\u305b\u308b\u51e6\u7406\u3092\u884c\u3046\u3002 fileopen.rb #!/bin/env ruby $KCODE='utf8' require 'kconv' csv = 'sample.csv' # CSV \u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30b3\u30fc\u30c9 input_char_encoding = 'Shift-JIS' # SQL \u6587\u3092\u4fdd\u5b58\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30b3\u30fc\u30c9 output_char_encoding = 'UTF-8' def convert_char_encoding(encoding, data) b\u2026"}