ä»æ´ã§ãããnkfã使ãã¨ãåè§ã«ããå ¨è§ã«ãã«å¤æããããã¨ãç¥ã£ãã
$ cat test.txt ã¦ã㨠ãã¹ã ï¾ï½½ï¾ test
ã¿ãããªãã¡ã¤ã«ããã£ãã¨ãã¦ãnkfãå®è¡ãã¦ã¿ãã¨ããã
$ nkf -w test.txt ã¦ã㨠ãã¹ã ãã¹ã test
ãã®éãã(âã§ã¯3è¡ç®ã®)åè§ã«ãã®æååãå
¨è§ã«ãã¸ã¨å¤æããã¦åºåãããã
nkfå®è¡æã«ãåè§ã«ãã®ã¾ã¾åºåããããå ´å
"-x"ãªãã·ã§ã³ã使ãã
$ nkf -wx test.txt ã¦ã㨠ãã¹ã ï¾ï½½ï¾ test
ãã®éããåè§ã«ãã®å¤æã¯è¡ãããã«åºåãããã
ã¡ãªã¿ã«ãmanã«ã¯ä»¥ä¸ã®ããã«è¨è¼ããã¦ãã¾ãã
-x é常ãããªããããããããåè§ã«ã (JIS X 0201 çä»®å) ããããããå ¨è§ã«ã (JIS X 0208 çä»®å) ã¸ã®å¤æãè¡ãããåè§ã«ããä¿åããã å ¥åã¯ãShift_JIS ã® 1byte ã«ããSO/SIãESC-(-I, SSO ãåãä»ããã åºåã¯ãæ¥æ¬èª EUC ä¸ã§ã¯ SSOãJIS ã³ã¼ãä¸ã§ã¯ ESC-(-I ãããã©ã«ãã§ç¨ããã