Forums: 公開討議 (Thread #24571)

EUC_JPに変換できない (2009-11-13 20:33 by Anonymous #46956)

複数の文字コードが混在し、絵文字が含まれるファイルをEUC_JPに変換したいのですが、
うまく変換できません。

<実施した内容>

「nkf -ex」・・絵文字以降が文字化けする。
「nkf --ic=euc-jp --oc=sjis 」のあと、「nkf --ic=sjis --oc=euc-jp 」・・sjisからeucに変換できない文字が残る。


他に方法はございませんでしょうか。

Reply to #46956×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: EUC_JPに変換できない (2009-11-13 23:47 by naruse #46958)

sjisの代わりにCP932、euc-jpの代わりにeucJP-msを指定するとうまく行きませんか。
Reply to #46956

Reply to #46958×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: EUC_JPに変換できない (2009-11-16 18:56 by Anonymous #47009)

ご教授いただいた方法で試したところ、cp932からeucJP-msに変換できない文字がありました。
sjisをUTF-8にしたところ、うまくいきました。
もう1点質問なのですが、変換できない文字をスペースや他の文字に置き換えるような機能は
ありますでしょうか。

Reply to #46956

Reply to #47009×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: EUC_JPに変換できない (2009-11-16 18:59 by Anonymous #47010)

補足です。
UTF-8からEUC_JPのとき、変換できない文字が削除されているようなので、
それをスペースに置き換えることはできないでしょうか。
Reply to #47009

Reply to #47010×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: EUC_JPに変換できない (2009-11-16 19:19 by naruse #47011)

--fb-subchar=0x20 を指定してください
Reply to #47010

Reply to #47011×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: EUC_JPに変換できない (2009-11-16 20:33 by Anonymous #47012)

ご教授いただいた方法で解決できました。ありがとうございました。
Reply to #47011

Reply to #47012×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login