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

pathname_cwd should decode cwd() before use #2413

Open
xworld21 opened this issue Sep 5, 2024 · 2 comments
Open

pathname_cwd should decode cwd() before use #2413

xworld21 opened this issue Sep 5, 2024 · 2 comments

Comments

@xworld21
Copy link
Contributor

xworld21 commented Sep 5, 2024

Offending line, I think:

if (my $cwd = cwd()) {

It turns out that Cwd returns bytes (char *) that need to be decoded in the appropriate locale. The current behaviour causes issues in postprocessing when non-ASCII characters are present (see vlmantova/bookml#18). Even just running latexmlpost will show 'paginating /path/to/file.xml' with mangled characters.

Cc @leorolla

@xworld21
Copy link
Contributor Author

xworld21 commented Sep 5, 2024

(Alternatively, Pathname functions should work on bytes, not strings! Which might be the safer alternative, since detecting the filesystem encoding is not an easy task.)

@dginev dginev added this to the LaTeXML-0.8.9 milestone Sep 5, 2024
@xworld21
Copy link
Contributor Author

xworld21 commented Sep 6, 2024

I should note that this is not a Windows bug, we have replicated it on Linux and macOS.

@dginev dginev added latexml and removed Windows labels Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants