MATLAB incorrectly recognizes UTF-8 Korean character

I am using MATLAB R2015b on Windows 10. OS language is Korean.
I've put the followings in `startup.m`
feature('DefaultCharacterSet','UTF8');
feature('DefaultCharacterSet') % check
slCharacterEncoding('UTF-8');
slCharacterEncoding() % check
When MATLAB start, it says:
ans =
UTF-8
ans =
UTF-8
However, when I open a file coded with UTF-8, Korean characters are incorrectly displayed. On the left, the file is opened in Visual Studio Code, on the right, in MATLAB editor.
One thing is that,
import java.nio.charset.Charset
encoding = Charset.defaultCharset()
says
encoding =
x-windows-949
I think this is a root of the problem. Can I edit such configuration in Java for MATLAB?

댓글 수: 1

I've added the followings in `java.opts` in the same place of `startup.m`, but it seems it does not have an effect.
-Dfile.encoding=UTF-8
-Dclient.encodindg=UTF-8
-Dclient.encoding.override=UTF-8

댓글을 달려면 로그인하십시오.

답변 (1개)

Vaibhav Awale
Vaibhav Awale 2016년 5월 6일

0 개 추천

Hi,
It appears that this issue might be related to following bug: Oracle bug report.
You can try changing your font preference to check if this issue gets resolved.
Hope this helps.
Regards,
Vaibhav

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

질문:

N/A
2016년 4월 30일

답변:

2016년 5월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by