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

map on an AbstractString, if no more specific map method found, returns UTF8String always #11464

Closed
ScottPJones opened this issue May 28, 2015 · 3 comments

Comments

@ScottPJones
Copy link
Contributor

This affects map on UTF16String, in particular, showing up in #11460, as currently uppercase/lowercase both use map for UTF16String, and that can be solved by making more specific (and much faster) uppercase/lowercase methods for UTF16String (as is done for ASCIIString), however, the general case also needs to be fixed... map on an AbstractString should always return the same type.

@JeffBezanson
Copy link
Member

map on an AbstractString can't always return the same type, if you map an ASCIIString to a result that has non-ASCII characters.

@ScottPJones
Copy link
Contributor Author

OK, that makes sense, but where it is just different encodings of Unicode (as opposed to a subset, like
ASCII or Latin1), wouldn't you agree that it should stay in the same encoding (and type)?

@JeffBezanson
Copy link
Member

Yes.

ScottPJones added a commit to ScottPJones/julia that referenced this issue Jun 17, 2015
ScottPJones added a commit to ScottPJones/julia that referenced this issue Jun 19, 2015
ScottPJones added a commit to ScottPJones/julia that referenced this issue Jun 19, 2015
tkelman added a commit that referenced this issue Jun 24, 2015
Fix #11460, Fix #11464 uppercase/lowercase/map on a UTF16String should return a UTF16String
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