Ticket #38800

fb-java の結果がおかしい

Open Date: 2018-12-12 22:18 Last Update: 2018-12-15 17:43

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

Details

git 先端でないとそもそも fb-java が動きませんが、先端の状態で、BMP外を食わせるとこうなります。

seiji@hyades:~/skf/skftst$ nkf -W -e --fb-java undefcodetest.txt
00D0: \u00D0 \u00D1 \u00D2 \u00D3 \u00D4 \u00D5 \u00D6 × \u00D8 \u00D9 \u00DA \u00DB \u00DC \u00DD \u00DE \u00DF
9D80: \u9D80 \u9D81 \u9D82 \u9D83 \u9D84 \u9D85 \u9D86 鶇 \u9D88 鶉 \u9D8A \u9D8B \u9D8C \u9D8D \u9D8E 鶏
020010:\U00020010 \U00020011 \U00020012 \U00020013 \U00020014 \U00020015 \U00020016 \U00020017 \U00020018 \U00020019 \U0002001A \U0002001B \U0002001C \U0002001D \U0002001E \U0002001F
seiji@hyades:~/skf/skftst$ jxd undefcodetest.txt
00000000 30 30 44 30 3a 20 c3 90  20 c3 91 20 c3 92 20 c3  00D0: .. .. .. .
00000010 93 20 c3 94 20 c3 95 20  c3 96 20 c3 97 20 c3 98  . .. .. .. .. ..
00000020 20 c3 99 20 c3 9a 20 c3  9b 20 c3 9c 20 c3 9d 20   .. .. .. .. ..
00000030 c3 9e 20 c3 9f 0a 39 44  38 30 3a 20 e9 b6 80 20  .. ...9D80: ...
00000040 e9 b6 81 20 e9 b6 82 20  e9 b6 83 20 e9 b6 84 20  ... ... ... ...
00000050 e9 b6 85 20 e9 b6 86 20  e9 b6 87 20 e9 b6 88 20  ... ... ... ...
00000060 e9 b6 89 20 e9 b6 8a 20  e9 b6 8b 20 e9 b6 8c 20  ... ... ... ...
00000070 e9 b6 8d 20 e9 b6 8e 20  e9 b6 8f 0a 30 32 30 30  ... ... ....0200
00000080 31 30 3a f0 a0 80 90 20  f0 a0 80 91 20 f0 a0 80  10:.... .... ...
00000090 92 20 f0 a0 80 93 20 f0  a0 80 94 20 f0 a0 80 95  . .... .... ....
000000a0 20 f0 a0 80 96 20 f0 a0  80 97 20 f0 a0 80 98 20   .... .... ....
000000b0 f0 a0 80 99 20 f0 a0 80  9a 20 f0 a0 80 9b 20 f0  .... .... .... .
000000c0 a0 80 9c 20 f0 a0 80 9d  20 f0 a0 80 9e 20 f0 a0  ... .... .... ..
000000d0 80 9f 20 0a                                      .. .
seiji@hyades:~/skf/skftst$ nkf -V
Summary of my nkf 2.1.4 (2015-12-12) configuration:
  Compile-time options:
    Compiled at:                 Dec 12 2018 22:10:04
    Default output encoding:     LOCALE (UTF-8)
    Default output end of line:  LF
    Decode MIME encoded string:  ON
    Convert JIS X 0201 Katakana: ON
    --help, --version output:    STDOUT
seiji@hyades:~/skf/skftst$

これ Java ではなく Python の仕様ですな。Java は UTF-16 として Surrogate Pair を 16 進変換しないとだめなはず。

Attachment File List

No attachments

Ticket History (3/3 Histories)

2018-12-12 22:18 Updated by: efialtes
  • New Ticket "fb-java の結果がおかしい" created
2018-12-15 17:27 Updated by: naruse
Comment

ありがとうございます、c9c993f で修正しました。 さすがにそろそろリリースもしますかね

2018-12-15 17:43 Updated by: naruse
  • Status Update from Open to Closed
  • Resolution Update from None to Fixed

Edit

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