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

PG editor not decoding as expecting #1053

Open
Alex-Jordan opened this issue Apr 7, 2024 · 1 comment
Open

PG editor not decoding as expecting #1053

Alex-Jordan opened this issue Apr 7, 2024 · 1 comment

Comments

@Alex-Jordan
Copy link
Contributor

The attached problem file (the same one I posted in #1051) uses the unicode character ␠ to indicate a space. This is:
U+2420 : SYMBOL FOR SPACE

The character is used directly in the pg file. If I open the file up in vim, I see it as ␠. Also the problem renders that character fine when the problem is used in an assignment and a user visits it. And since I use xelatex, it does not break PDF production (although I see now that the font has no character for it and all the user sees is white space.)

But if I open this file in the PG editor, it does not decode that character as intended. The editor shows � and that's what you see in the editor's output panel. And what I see if I make a PDF from the editor.

I am changing the source to use ~~x{2420} and then things seem to all come out fine (except in PDF, where there is no glyph in the font for this). But is there an issue here with character encoding/decoding?

cipher.pg.txt

@drgrice1
Copy link
Member

drgrice1 commented Apr 7, 2024

When I view that problem in vim I see 'âÂ<90> '. I noticed in my email client (Thunderbird) it shows up the same as here in GitHub. When the problem renders in a set in Firefox on Linux I see nothing. It doesn't even look like there is white space there. When I open this in the PG editor I see what looks like a red dot where that character is, but I see nothing again in the rendered problem.

I am not sure this is an encoding issue. It seems that everything renders this unicode character differently.

I also tested with (this is cut and pasted from https://www.compart.com/en/unicode/U+2420). This works consistently in vim, the PG editor, and the rendered problem. Then I cut and pasted the character from your first comment in this GitHub thread, and it also works consistently. So it seems that something went wrong in the encoding/decoding process when you cut and pasted it into the problem initially.

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

No branches or pull requests

2 participants