Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding error #2338

Open
riastradh opened this issue Apr 27, 2024 · 0 comments · May be fixed by #2341
Open

Encoding error #2338

riastradh opened this issue Apr 27, 2024 · 0 comments · May be fixed by #2341

Comments

@riastradh
Copy link

The attached file in.txt does not round-trip under ledger print, which yields a file out.txt with invalid UTF-8 encoding.

Somehow, the input octet sequence e7 94 b0 (i.e., Unicode code point U+7530, CJK UNIFIED IDEOGRAPH-7530) is mapped to the output octet sequence e7 94, which is invalid UTF-8 because it is missing the b0 octet.

Reproduced in ledger 3.2.1-20200518 (which I'm still actively using in production because of #2318) and in ledger 3.3.2-20230330, under NetBSD 9.3.

I have also seen a variant of this where the output is sometimes encoded correctly and sometimes encoded incorrectly, varying randomly from invocation to invocation of the same ledger executable on the same input file.

riastradh pushed a commit to riastradh/ledger that referenced this issue Apr 27, 2024
@riastradh riastradh linked a pull request Apr 27, 2024 that will close this issue
riastradh pushed a commit to riastradh/ledger that referenced this issue Apr 27, 2024
riastradh pushed a commit to riastradh/ledger that referenced this issue Apr 27, 2024
riastradh pushed a commit to riastradh/ledger that referenced this issue Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant