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

Unicode in Source files #1691

Closed
gunterkoenigsmann opened this issue Jun 12, 2022 · 5 comments
Closed

Unicode in Source files #1691

gunterkoenigsmann opened this issue Jun 12, 2022 · 5 comments

Comments

@gunterkoenigsmann
Copy link
Member

@daute and @richardgobeli have found out: If there is no BOM at the end of a source file it is up to the C compiler to decide if the file is unicode or an exotic codepage => We need to replace all 8-bit letters by an "\uxxxx" command that explicitly specifies that this is meant as an Unicode char.

@gunterkoenigsmann
Copy link
Member Author

A regex that seems to find this kind of characters is

"[\x80-\xFF]"

@gunterkoenigsmann
Copy link
Member Author

Grep doesn't like that one if not in the form

grep --color -nH --null -P -n -e "[\x80-\xFF]" * -R

@richardgobeli
Copy link
Collaborator

What does the & character do in the string in front of ad?
series_sub->Append(menu_pade, _("P&ad\u00E9 Approximation..."),

There must be more to it than just putting \u00E9 because the character is still wrong from yesterday.
image
image

@gunterkoenigsmann
Copy link
Member Author

The "&" character makes that character an accellerator (I believe you can press that key or alt + that key) for reaching the menu entry faster.

But that unicode still isn't treated correctly is weird...

daute added a commit that referenced this issue Jun 16, 2022
According to https://wiki.wxwidgets.org/Unicode
one should use the wxT()-macro for unicode strings.
(not really sure if wxT(_(...)) or _(wxT(...)) is correct).

This fixes issue #1691 (especially richardgobelis comment
for the Windows case).
@daute
Copy link
Member

daute commented Jun 16, 2022

Fixed with commit 5cbec07.

@daute daute closed this as completed Jun 16, 2022
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

3 participants