Matlab × symbol does not show correctly in Julia on Windows
Seems to be only an issue on windows.
Look at ZData: [1�0 double]
On linux this shows correctly 1×0
julia> using MATLAB
julia> x = linspace(0,1,10)
julia> eval_string("h=plot($x)")
h =
Line with properties:
Color: [0 0.4470 0.7410]
LineStyle: '-'
LineWidth: 0.8000
Marker: 'none'
MarkerSize: 6
MarkerFaceColor: 'none'
XData: [1 2 3 4 5 6 7 8 9 10]
YData: [0 0.1111 0.2222 0.3333 0.4444 0.5556 0.6667 0.7778 0.8889 1]
ZData: [1�0 double]
Any clues why such behavior would be exhibited on windows only. Presumably mac is also correct.
I would guess you are using a not-particularly-unicode-friendly font on windows. I have had to hack the registry to get DejaVu Sans Mono into the console.
On the preview versions of Windows 10, DejaVu Sans Mono is an available command prompt font. Perhaps there are some more subtle font interaction problems?
Checked it out myself. I see this, too.
Somehow this is related to engEvalString and here http://stackoverflow.com/questions/15735072/get-matlab-engine-to-return-unicode I'm not sure if that really provides any solutions we can use
another case (but perhaps more expected)
julia> s = MATLAB.eval_string("s='Paul Erdős'")
julia> @mget s
"Paul Erdős"
So it seems that we may have to enforce the locale on windows/osx
feature('DefaultCharacterSet', 'UTF-8')
Example
julia> using MATLAB
julia> mat" feature('DefaultCharacterSet')"
"windows-1252"
julia> MATLAB.eval_string("s = 'Erdős'")
s =
'Erdős'
julia> mat"s = 'Erdős'"
julia> get_variable(:s)
"Erdős" # WRONG
# LET'S FORCE UTF8 in MATLAB
julia> mat" feature('DefaultCharacterSet', 'UTF-8')"
"windows-1252"
julia> mat"s = 'Erdős'"
julia> MATLAB.eval_string("s = 'Erdős'")
s =
'Erd→s'
julia> get_variable(:s)
"Erdős" # Yay