iconv Windows-31j(CP932)(CRLF)とUTF-8(LF)間の変換¶
# sjis.txt: Windows-31j(CP932)(CRLF) # UTF-8.txt: UTF-8(LF) # sjis.txt -> UTF-8.txt $ <sjis.txt tr -d '\r' | inconv -f Windows-31j -t UTF-8 >UTF-8.txt # UTF-8.txt -> sjis.txt $ <UTF-8.txt perl -wpe 's/\n/\r\n/' | iconv -f UTF-8 -t Windows-31j >sjis.txt 補足:
参考: CP932変換表の問題が顕在化する例 - yanok.net
Last modified: 2016-12-23 | ||
|
||
|
||
© Shin Nakamura/BasicWerk 2008 - 2024 |