
IR.0-4の日記: コマンドライン上でのunicode escape sequenceのデコード
日記 by
IR.0-4
Javascriptなんかで使う「unicode escape sequence」形式のデコード
nkfとsed
echo '\uFF53\uFF4C\uFF41\uFF53\uFF48\uFF44\uFF4F\uFF54\uFF0E\uFF4A\uFF50' | sed -e 's/\\u\(....\)/\&#x\1;/g' | nkf --numchar-input
sedで「Unicode数値文字参照」に変換したあと、nkfで変換
コマンドライン上でのunicode escape sequenceのデコード More ログイン