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

Handling of overlong character literals #25645

Closed
bkamins opened this issue Jan 19, 2018 · 1 comment
Closed

Handling of overlong character literals #25645

bkamins opened this issue Jan 19, 2018 · 1 comment

Comments

@bkamins
Copy link
Member

bkamins commented Jan 19, 2018

After the change of Char representation it is possible to get overlong characters from a String, e.g.:

julia> c = String([0xc0,0xa0])[1]
'\xc0\xa0': [overlong] Unicode U+0020 (category Zs: Separator, space)

However, if you try to write this as a character literal you get:

julia> '\xc0\xa0'
' ': ASCII/Unicode U+0020 (category Zs: Separator, space)

so they are converted to their not-overlong equivalents.

I know it is a corner case, but I suppose that this behavior is not intentional.
So the question is is this a behavior we want (or we want character literal to be parsed exactly as written)?

@JeffBezanson
Copy link
Member

Duplicate of #25072

@JeffBezanson JeffBezanson marked this as a duplicate of #25072 Jan 20, 2018
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