{"id":15118,"date":"2023-09-14T21:17:23","date_gmt":"2023-09-14T12:17:23","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=15118"},"modified":"2023-09-19T07:32:01","modified_gmt":"2023-09-18T22:32:01","slug":"linux%e3%81%a7%e6%96%87%e5%ad%97%e3%82%b3%e3%83%bc%e3%83%89%e3%82%92%e5%a4%89%e6%8f%9b%e3%81%99%e3%82%8b%ef%bc%81%ef%bc%88nkf%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/15118","title":{"rendered":"Linux\u3067\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u5909\u63db\u3059\u308b\uff01\uff08nkf\uff09"},"content":{"rendered":"<p>Linux\u3067\u3001nkf\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u5909\u63db\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>nkf\u30b3\u30de\u30f3\u30c9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h2>\n<p>nkf\u30b3\u30de\u30f3\u30c9\u306f\u3001Ubuntu\u3067\u306fapt\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo apt install nkf\r\n<\/pre>\n<p>RHEL\u306f\u3084\u3063\u304b\u3044\u3067\u3059\u3002RHEL 8\u4ee5\u524d\u306fCodeReady\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u7528\u3057\u305f\u308a\u3001\u30bd\u30fc\u30b9\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002RHEL 9\u306f\u3001EPEL\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u3001EPEL\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u767b\u9332\u3057\u307e\u3059\u3002<br \/>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/15077\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"RHEL 9\u306bEPEL\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2022\/04\/fi_rhel_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">RHEL 9\u306bEPEL\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3059\u308b\uff01<\/div><div class=\"substr\">RHEL 9\u306bEPEL\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n\u305d\u306e\u5f8c\u3001dnf\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo dnf install nkf\r\n<\/pre>\n<h2>nkf\u3067ASCII\u6587\u5b57\u3092SJIS\u304b\u3089UTF-8\u306b\u5909\u63db\u3059\u308b\uff01<\/h2>\n<p>nkf\u3067ASCII\u6587\u5b57\u3092SJSI\u304b\u3089UTF-8\u306b\u5909\u63db\u3057\u3066\u307f\u307e\u3059\u3002\u6587\u5b57\u30b3\u30fc\u30c9\u306f\u5909\u63db\u3055\u308c\u308b\u3053\u3068\u306a\u304f\u3001iconv\u3067\u767a\u751f\u3059\u308b\u30d0\u30c3\u30af\u30b9\u30e9\u30c3\u30b7\u30e5\u3068\u30c1\u30eb\u30c0\u306e\u554f\u984c\u306e\u3088\u3046\u306b\u30af\u30bb\u306e\u3042\u308b\u5909\u63db\u306f\u767a\u751f\u3057\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3]; title: ; notranslate\" title=\"\">\r\n$ cat ascii_sjis.txt \r\n !&quot;#$%&amp;'()*+,-.\/0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ&#x5B;\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\r\n$ nkf -w ascii_sjis.txt \r\n !&quot;#$%&amp;'()*+,-.\/0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ&#x5B;\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\r\n<\/pre>\n<h2>nkf\u3067\u534a\u89d2\u30ab\u30bf\u30ab\u30ca\u3092SJIS\u304b\u3089UTF-8\u306b\u5909\u63db\u3059\u308b\uff01<\/h2>\n<p>\u4eca\u5ea6\u306f\u3001\u534a\u89d2\u30ab\u30bf\u30ab\u30ca\u3092SJIS\u304b\u3089UTF-8\u306b\u5909\u63db\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002iconv\u3068\u304f\u3089\u3079\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3]; title: ; notranslate\" title=\"\">\r\n$ iconv -f sjis -t utf8 hankata_sjis.txt \r\n\uff61\uff62\uff63\uff64\uff65\uff66\uff67\uff68\uff69\uff6a\uff6b\uff6c\uff6d\uff6e\uff6f\uff70\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff95\uff96\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff9d\uff9e\uff9f\r\n$ nkf -w hankata_sjis.txt \r\n\u3002\u300c\u300d\u3001\u30fb\u30f2\u30a1\u30a3\u30a5\u30a7\u30a9\u30e3\u30e5\u30e7\u30c3\u30fc\u30a2\u30a4\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f3\u309b\u309c\r\n<\/pre>\n<p>nkf\u3067\u306f\u5168\u89d2\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u300c-x\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u52a0\u3057\u3066\u534a\u89d2\u306e\u307e\u307eUTF-8\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3]; title: ; notranslate\" title=\"\">\r\n$ nkf -wx hankata_sjis.txt \r\n\uff61\uff62\uff63\uff64\uff65\uff66\uff67\uff68\uff69\uff6a\uff6b\uff6c\uff6d\uff6e\uff6f\uff70\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff95\uff96\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff9d\uff9e\uff9f\r\n<\/pre>\n<h2>nkf\u30b3\u30de\u30f3\u30c9\u3067\u4f7f\u7528\u3067\u304d\u308b\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>nkf\u30b3\u30de\u30f3\u30c9\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u6587\u5b57\u30b3\u30fc\u30c9\u306f\u3001\u30b3\u30de\u30f3\u30c9\u306e\u30d8\u30eb\u30d7\u3067\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ nkf --help\r\nUsage:  nkf -&#x5B;flags] &#x5B;--] &#x5B;in file] .. &#x5B;out file for -O flag]\r\n j\/s\/e\/w  Specify output encoding ISO-2022-JP, Shift_JIS, EUC-JP\r\n          UTF options is -w&#x5B;8&#x5B;0],{16,32}&#x5B;{B,L}&#x5B;0]]]\r\n J\/S\/E\/W  Specify input encoding ISO-2022-JP, Shift_JIS, EUC-JP\r\n          UTF option is -W&#x5B;8,&#x5B;16,32]&#x5B;B,L]]\r\n m&#x5B;BQSN0] MIME decode &#x5B;B:base64,Q:quoted,S:strict,N:nonstrict,0:no decode]\r\n M&#x5B;BQ]    MIME encode &#x5B;B:base64 Q:quoted]\r\n f\/F      Folding: -f60 or -f or -f60-10 (fold margin 10) F preserve nl\r\n Z&#x5B;0-4]   Default\/0: Convert JISX0208 Alphabet to ASCII\r\n          1: Kankaku to one space  2: to two spaces  3: HTML Entity\r\n          4: JISX0208 Katakana to JISX0201 Katakana\r\n X,x      Convert Halfwidth Katakana to Fullwidth or preserve it\r\n O        Output to File (DEFAULT 'nkf.out')\r\n L&#x5B;uwm]   Line mode u:LF w:CRLF m:CR (DEFAULT noconversion)\r\n --ic=&lt;encoding&gt;        Specify the input encoding\r\n --oc=&lt;encoding&gt;        Specify the output encoding\r\n --hiragana --katakana  Hiragana\/Katakana Conversion\r\n --katakana-hiragana    Converts each other\r\n --{cap, url}-input     Convert hex after ':' or '%'\r\n --numchar-input        Convert Unicode Character Reference\r\n --fb-{skip, html, xml, perl, java, subchar}\r\n                        Specify unassigned character's replacement\r\n --in-place&#x5B;=SUF]       Overwrite original files\r\n --overwrite&#x5B;=SUF]      Preserve timestamp of original files\r\n -g --guess             Guess the input code\r\n -v --version           Print the version\r\n --help\/-V              Print this help \/ configuration\r\nNetwork Kanji Filter Version 2.1.4 (2015-12-12) \r\nCopyright (C) 1987, FUJITSU LTD. (I.Ichikawa).\r\nCopyright (C) 1996-2015, The nkf Project.\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>nkf\u30b3\u30de\u30f3\u30c9\u306f\u3001iconv\u3088\u308a\u30b9\u30c8\u30ec\u30fc\u30c8\u306a\u5909\u63db\u3092\u884c\u3044\u307e\u3059\u304c\u3001\u534a\u89d2\u30ab\u30bf\u30ab\u30ca\u306f\u5168\u89d2\u306b\u5909\u63db\u3055\u308c\u307e\u3059\u3002\u6587\u5b57\u30b3\u30fc\u30c9\u5909\u63db\u306f\u30b3\u30de\u30f3\u30c9\u7279\u6709\u306e\u7279\u5fb4\u304c\u3042\u308b\u306e\u3067\u3001\u672c\u683c\u7684\u306b\u4f7f\u7528\u3059\u308b\u969b\u306b\u306f\u5909\u63db\u30d1\u30bf\u30fc\u30f3\u3092\u4e8b\u524d\u306b\u8abf\u67fb\u3057\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/8020\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u30d5\u30a1\u30a4\u30eb\u3092\u64cd\u4f5c\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2021\/02\/fi_linux_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u30d5\u30a1\u30a4\u30eb\u3092\u64cd\u4f5c\u3059\u308b\uff01<\/div><div class=\"substr\">Linux\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u30d5\u30a1\u30a4\u30eb\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u3067\u3001nkf\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u5909\u63db\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5527,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110],"tags":[282,1194,25,1195,932],"class_list":["post-15118","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-processing","tag-linux","tag-nkf","tag-25","tag-1195","tag-932"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/15118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=15118"}],"version-history":[{"count":7,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/15118\/revisions"}],"predecessor-version":[{"id":15209,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/15118\/revisions\/15209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/5527"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=15118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=15118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=15118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}