-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
[Feature request] numeric escape sequences in strings #962
Comments
You can do Actually storing arbitrary bytes in strings is a matter for #938. |
Octal strings are impossible to add: That being said, there's a bigger underlying problem here: the source character set doesn't match the output character set. The existence of And if you control the full source of the translation unit, you can define your own escape sequences (perhaps in an included file) and just use them anywhere. Backslashes aren't available, but you can use literally any other character:
|
That can even be automated:
|
Should this be closed, then? |
Numeric escape sequences in strings such as e.g.
\000
\xff
(in particular, the former) might be useful for automatic code generators so that they don't have to output an additional zero outside of the string.Example:
The text was updated successfully, but these errors were encountered: