aboutcode-org / aboutcode-org/scancode-toolkit

compiledcode: java class strings are not utf-8 but mutf-8

Abierto
#3,145 3 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

### Description

The parser for Java byte code is incorrect: it treats strings (incl method names, class names, and so on) as UTF-8, but according to the Java class specification these are MUTF-8:

While for *most* strings they are interchangeable it will be different once you start getting non-Western strings (example: CJK). If strings are important to you, then you should add another step and that's translating the strings. For this I am using the mutf8 package although I have a feeling that there are still a few bugs in that package (that I need to chase).

MUTF-8 is also used in Android byte code.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.