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

UTF16 support #4930

Closed
vtjnash opened this issue Nov 26, 2013 · 15 comments
Closed

UTF16 support #4930

vtjnash opened this issue Nov 26, 2013 · 15 comments
Milestone

Comments

@vtjnash
Copy link
Member

vtjnash commented Nov 26, 2013

I would like to merge UTF16 support into base. My reason is that all the good windows API's require UTF16 support, so it would be nice to have native support for this third ByteString String type. (see also #1919)

My intention was to move the code from the UTF16 package to Base:
https://github.com/nolta/UTF16.jl (@nolta)

Please let me know your concerns so I can attempt to address them.

@JeffBezanson
Copy link
Member

UTF16 is not a ByteString.

@vtjnash
Copy link
Member Author

vtjnash commented Nov 26, 2013

In what way?

@JeffBezanson
Copy link
Member

In that nearly every method we have defined for ByteString will not work on UTF16. ByteString has something to do with the basic storage unit being a byte, but really I think the only meaning one can ascribe to it is "ASCII or UTF8". Originally the only purpose of it was so we could have an ASCII vs. UTF8 distinction for performance, but not think about the difference most of the time. At this stage I would prefer folding all three of those types into one.

@StefanKarpinski
Copy link
Member

I.e. ASCIIString, UTF8String and ByteString. The only other potential candidate for ByteStringiness is Latin1 strings, but I'm not even sure that's a good idea. We've gotten remarkably far without ever needing to pass a Latin1 string to any C API.

@vtjnash
Copy link
Member Author

vtjnash commented Nov 26, 2013

OK. It doesn't sound like there are any objections then? Just don't call it a bytestring? I'm quite all right with that.

@StefanKarpinski
Copy link
Member

Yes, it's clearly something we need to do for Windows.

@nolta
Copy link
Member

nolta commented Nov 26, 2013

Fine by me. I'll move the code over.

@nolta nolta closed this as completed in db2c6ef Nov 26, 2013
@StefanKarpinski
Copy link
Member

We should probably leave the UTF16 as a do-nothing stub that prints a warning when loaded since people may well still be loading it for a while.

@StefanKarpinski
Copy link
Member

^ package

@nolta
Copy link
Member

nolta commented Nov 26, 2013

I was thinking about setting UTF16's REQUIRE to julia 0.2- 0.3?

@StefanKarpinski
Copy link
Member

Sorry, huge reopen button on a small phone. So that 0.3 is a hard stop on when people can even have 0.3 installed through the package manager?

@vtjnash
Copy link
Member Author

vtjnash commented Nov 26, 2013

Wow, that was fast. Thanks all! I may try to do some work on cleaning up the windows API stuff over thanksgiving (unless someone else wants to take it -- i would be more than happy to give it away).

@nolta
Copy link
Member

nolta commented Nov 26, 2013

@StefanKarpinski Not sure i understand your comment. Would julia 0.2- 0.3- be better?

@StefanKarpinski
Copy link
Member

If it's just a stub, I'm not clear on why capping that allowable Julia version matters.

@stevengj
Copy link
Member

To convert binary data to UTF-16, see also #6546.

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

5 participants