Encode mishandles unrepresentable Shift_JIS characters and FB_PERLQQ
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with t/pp_07_coder_check_value.t and the loaded t/tests/07_coder_check_value_euc-jp.t regression, then trace the PerlOnJava Encode implementation used by both JVM and interpreter backends. Reproduce the behavior with system Perl, add a focused regression for Shift_JIS replacement and Encode::FB_PERLQQ, and verify both backend results plus the upstream suite.
索引モデルが issue の本文から書いたものです。
説明
Summary
Text-CSV-Encoded 0.25's unchanged EUC-JP encoding test passes under system Perl but fails on both PerlOnJava backends. The failure shows that encoding an unrepresentable character to Shift_JIS does not honor Encode's replacement/check behavior: output loses CSV quoting, and Encode::FB_PERLQQ yields U+FFFD instead of the expected \\x{2460} representation.
Reproduction
- CPAN random tester run:
20261002-182937-4648 - Distribution:
Text-CSV-Encoded0.25 - Test:
t/pp_07_coder_check_value.t, which loadst/tests/07_coder_check_value_euc-jp.t - Environment: macOS arm64, Java 24.0.2, PerlOnJava 5.44.1 (build commit
78521d8d0, 2026-10-02)
The test parses EUC-JP input and combines fields as Shift_JIS. It checks default replacement behavior and then sets encode_check_value(Encode::FB_PERLQQ) before repeating the operation.
System Perl 5.42.2 passes the complete upstream suite (14 files, 255 tests).
PerlOnJava fails both assertions on both backends:
not ok 1
got: '...,?'
expected: '...,"?"'
not ok 2
got: '...,\\x{FFFD}'
expected: '...,"\\x{2460}"'
The result was reproduced with the archived distribution and current PerlOnJava build on both JVM and interpreter backends. The distribution has no XS/C source; its xs_* tests exercise the separate Text::CSV dependency.
Expected behavior
Match system Perl for Shift_JIS encoding of characters that cannot be represented, including the default replacement and FB_PERLQQ check behavior. Preserve the resulting CSV field quoting.
Add a focused project regression for the encoding/check behavior, validate it with system Perl, then verify it on both PerlOnJava backends and rerun the upstream test.
Related issue
Related to #1445, which tracks PerlOnJava Encode compatibility, though that issue covers canonical charset names rather than unrepresentable-character handling.
- 主要言語
- Perl
- スター
- 64
- フォーク
- 7
- 平均マージ
- 4時間 29分
- マージ済み PR(30日)
- 176
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fglock/PerlOnJava のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fglock/PerlOnJava#1579 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port area:unicode bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
fglock/PerlOnJava#1341 ·
メンテナーはふだん 1 日以内に返信
-
area:platform area:runtime bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
fglock/PerlOnJava#1635 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port area:runtime bug
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
fglock/PerlOnJava#1634 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
fglock/PerlOnJava#1633 ·
メンテナーはふだん 1 日以内に返信
fglock/PerlOnJava の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
convos-chat/convos#977 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
inverse-inc/packetfence#9387 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
linux-test-project/lcov#552 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
szTheory/exifcleaner#383 ·
メンテナーはふだん 1 日以内に返信
-
1.severity: security
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NixOS/nixpkgs#569828 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信