Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Encode mishandles unrepresentable Shift_JIS characters and FB_PERLQQ

Abierto
#1,629 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, perl
Área
compilers

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area:cpan-port area:unicode bug

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-Encoded 0.25
  • Test: t/pp_07_coder_check_value.t, which loads t/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.

Lenguaje dominante
Perl
Estrellas
64
Forks
7
Merge medio
4 h 29 min
PR fusionados (30 d)
176

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fglock/PerlOnJava

Todos los issues de fglock/PerlOnJava

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.