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

UTF8 variable names can rejected on platforms where not supported in linker #17886

Open
dlangBugzillaToGithub opened this issue Nov 20, 2018 · 1 comment

Comments

@dlangBugzillaToGithub
Copy link

Iain Buclaw (@ibuclaw) reported this on 2018-11-20T21:59:50Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=19418

CC List

  • Dennis

Description

One could follow the example of C11. 6.4.2.1 General, n.71 suggests
---
On systems in which linkers cannot accept extended characters, an
encoding of the universal character name may be used in forming valid
external identifiers. For example, some otherwise unused character or
sequence of characters may be used to encode the \u in a universal
character name.  Extended characters may produce a long external
identifier
---

However for consistency, having a special mangle/encoding of UTF8 characters in symbol names could be done instead.

Since UTF8 characters in symbols are not link compatible with C or C++ anyway, there is no problem in doing it this way across all linkages.
@dlangBugzillaToGithub
Copy link
Author

dkorpel commented on 2024-02-07T13:53:41Z

Perhaps Punycode can be used: https://en.wikipedia.org/wiki/Punycode

I believe Rust is going to use that: https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html

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

1 participant