-
Notifications
You must be signed in to change notification settings - Fork 65
Use transcode for string convert to Julia #76
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
Conversation
|
I'm not sure we can assume characters are always UTF-16. In R2015a+ we should probably use mxArrayToUTF8String since it is guaranteed to handle the locale properly. |
|
http://www.ece.northwestern.edu/local-apps/matlabhelp/techdoc/apiref/mxchar.html Also |
|
Just because MATLAB is storing characters as 16-bit integers does not necessarily mean it's encoding them as UTF-16, which is what |
|
Although http://www.mathworks.com/help/matlab/apiref/mxchar.html suggests it is UTF-16 (really UCS-2) at least on new-ish MATLAB, so maybe this is okay. |
|
people on versions older than 2006 are out of luck, I think that's fine since it's 10 years old at this point |
|
I think there are versions newer than 2006 that don't use UTF-16 internally (mxChar was introduced before 2006a, but looking around online it's clear it wasn't always defined to be Unicode), but I don't think there's a convenient way to convert their internal encodings to UTF-8, and 16-bit ISO-8859-1 is basically the same as UTF-16, so I'm fine with this. |
|
we might have to revert this. It's not properly handling some unicode glyphs |
|
@musm which? It was working fine for me in |
|
@twadleigh see the test added at: #78 |
|
I can't duplicate a test failure in If I throw the following into and call it from MATAB, I get: |
No description provided.