フィルターのクリア

MATLAB improperly renders UTF-8 encoded character (chinese) when calling text()

3 ビュー (過去 30 日間)
dwight nwaigwe
dwight nwaigwe 2020 年 4 月 2 日
Hello,
I am trying to call text() to inscribe a UTF-8 encoded character (traditional chinese) into a figure. Before calling text(), I read the characters from a text file (with the proper UTF-8 encoding), using textscan(). I can verify that the characters are read correctly as I am able to view them in the workspace toolbar. However, the character is not properly displayed when calling text() in most cases. What usually happens is that I get a secondary box-like character that is displayed next to the correct character (see attached image). For some fonts, this does not happen, but for most it does. What is going on here?
What may be a hint is that when I print the character to the console I see a small dot before my character. Perhaps this small dot corresponds to the additional character that is rendered using text()? Oddly, I do not see this small dot when viewing the character in the workspace toolbar.
thanks

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by