Effacer les filtres
Effacer les filtres

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

3 vues (au cours des 30 derniers jours)
dwight nwaigwe
dwight nwaigwe le 2 Avr 2020
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

Réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by