Ticket #32328

SJIS 入力中の ESC+マルチバイト文字のデコード問題

Open Date: 2013-10-25 17:29 Last Update: 2013-11-06 11:32

Reporter:
Owner:
(None)
Type:
Status:
Closed
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
2

Details

Shift_JIS 入力中に ESC に続いてマルチバイト文字が現れるとデコードに失敗し、不正なデータが出力されます。 (変換先のエンコードには依存しません)

$ perl -e 'print "\x1Bあ"' |nkf -Ws |iconv -f SJIS -t UTF-8 |od -tx1
0000000 1b e3 81 82
0000004
$ perl -e 'print "\x1Bあ"' |nkf -Ws |nkf -Sw |od -tx1
0000000 1b 82
0000002

Ticket History (3/6 Histories)

2013-10-25 17:29 Updated by: fumiyas
  • New Ticket "SJIS 入力中の ESC+マルチバイト文字のデコード問題" created
2013-10-26 00:43 Updated by: fumiyas
Comment

ISO-2022-JP 入力中の ESC 続いてエスケープシーケンス (ESC, '(', 'B' など) が続いた場合も同様の問題があります。

2013-10-26 01:15 Updated by: fumiyas
Comment

ISO-2022-JP の場合の再現手順。

$ perl -e 'print "\x1Bあ"' |nkf -Wj |iconv -f ISO-2022-JP |od -tx1
0000000 1b e3 81 82
0000004
$ perl -e 'print "\x1Bあ"' |nkf -Wj |nkf -Jw |od -tx1
0000000 1b 1b 24 42 24 22
0000006
2013-11-06 11:32 Updated by: naruse
  • Status Update from Open to Closed
  • Ticket Close date is changed to 2013-11-06 11:32
Comment

e1ccdbdd3d9beb07f35ab0981083c9505230bd53 で修正しました、ありがとうございました。

Attachment File List

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login