{"author_name":"seiunsky","author_url":"https://blog.hatena.ne.jp/seiunsky/","categories":["Ruby"],"blog_title":"\u3059\u304c\u30d6\u30ed","image_url":"http://cdn-ak.f.st-hatena.com/images/fotolife/s/seiunsky/20081010/20081010065238.png","width":"100%","blog_url":"https://sugamasao.hatenablog.com/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsugamasao.hatenablog.com%2Fentry%2F20081010%2F1223590177\" title=\"\uff0b\u6697\u304c gsub \u3067\u304d\u306a\u3044 - \u3059\u304c\u30d6\u30ed\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","title":"\uff0b\u6697\u304c gsub \u3067\u304d\u306a\u3044","type":"rich","url":"https://sugamasao.hatenablog.com/entry/20081010/1223590177","published":"2008-10-10 07:09:37","height":"190","description":"\u3053\u308c\u306f Ruby \u306e\u4e0d\u5177\u5408\uff1f JIS\u30b3\u30fc\u30c9\u306e \uff0b\u6697 \u3068\u3044\u3046\u6587\u5b57\u3092 gsub*1\u306e\u7b2c\u4e8c\u5f15\u6570\u3068\u3057\u3066\u6e21\u3059\u3068\u6587\u5b57\u5316\u3051\u3059\u308b\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u691c\u8a3c\u3057\u3066\u307f\u308b\u3002 \u691c\u8a3c\u74b0\u5883 OS : Mac OSX Ruby : ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin9.3.0] \u3061\u306a\u307f\u306b\u3001Linux \u7248\u306e ruby 1.8.6 \u3067\u3082\u540c\u3058\u73fe\u8c61\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b \u5165\u529b\u30d5\u30a1\u30a4\u30eb test.txt \u3068\u3044\u3046\u540d\u524d\u306b\u3057\u3066\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u3092JIS\uff08ISO-2022-JP\uff09\u3067\u4f5c\u6210 \uff0b\u6697 \u691c\u8a3c\u30b9\u30af\u30ea\u30d7\u30c8 ruby -e \"str='test'; file = File.read(\u2026","provider_name":"Hatena Blog"}