{"description":"Mac\u3067\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u3068\u3001\u6539\u884c\u30b3\u30fc\u30c9\u304cLF\u3067\u4fdd\u5b58\u3055\u308c\u308b\u3002 \u305f\u3060\u3001Windows\u306b\u6e21\u3055\u306a\u3051\u308c\u3070\u884c\u3051\u306a\u3044\u6642\u306b\u3061\u3087\u3063\u3068\u9762\u5012\u3002 dos2unix \u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3082\u3042\u308b\u3089\u3057\u3044\u304c\u3001\u3042\u3048\u3066Ruby\u3067\u5909\u63db\u3057\u3066\u307f\u308b\u3002 \u6b63\u898f\u8868\u73fe\u3067\u3044\u3051\u308b\u304b\u3068\u601d\u3063\u305f\u304c\u3001\u306a\u3093\u304b\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u306e\u3067 require 'nkf' path = ARGV[0] s = \"\" File.open(path, 'r') do |f| f.each do |line| s << NKF.nkf(\"--windows\", line) end end File.open(path, 'w') do |f| f.puts s end nkf\u4e07\u2026","author_name":"gom68","blog_url":"https://gom.hatenablog.com/","height":"190","published":"2009-02-13 19:02:24","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgom.hatenablog.com%2Fentry%2F20090213%2F1234519344\" title=\"\u6539\u884c\u30b3\u30fc\u30c9LF\u3092CR+LF\u306b\u5909\u63db\u3059\u308b - gom68\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","title":"\u6539\u884c\u30b3\u30fc\u30c9LF\u3092CR+LF\u306b\u5909\u63db\u3059\u308b","version":"1.0","categories":["ruby"],"provider_name":"Hatena Blog","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/gom68/","blog_title":"gom68\u306e\u65e5\u8a18","url":"https://gom.hatenablog.com/entry/20090213/1234519344","image_url":null,"width":"100%"}