Burmese Character as a string

4 visualizzazioni (ultimi 30 giorni)
v k
v k il 7 Nov 2020
Commentato: Walter Roberson il 11 Nov 2020
Hello, I am trying to obtain the string representation of the burmese character given by the unicode number U+103A. But it does not print out, and only gives a box in the figure and the command window, even after using UTF8 as the character set. This unicode number is the exact figure of dotted circle with a solid semi-circle on top of the dotted circle.
How can I save this character as a string? Thanks.
p.s. - I am using other unicodes (in the same dot-m file) which require utf8 as the default character encoding. These ones require a non-English language, which is also the one set in the system Language Preferences. But this is not the Burmese language.
် this is the character.
  3 Commenti
v k
v k il 10 Nov 2020
2020a. Thank you for taking interest. I really need to print this character by any means.
Walter Roberson
Walter Roberson il 10 Nov 2020
What did you observe when you ran the test code I posted?

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 9 Nov 2020
Modificato: Walter Roberson il 9 Nov 2020
So I did some testing... but you will need to do the same tests on your own system to see how it goes.
The characters show up as combined (when the combining character is put after the base character) on the command window when LiveScript is used.
The characters do not show up as other than boxes in the test I did here online, on the experimental facility to display results for you, but when I test on my Mac, the characters show up separately for all fonts except a few of the Lucida fonts (and then they show up as boxes.) I was not able to get the characters to combine on a plot... except by drawing multiple characters at the same position (but then they will not combine properly as the dotted circle will show up, which should not happen when a real combination is done.)
Please test this code on your own system, inside of and outside of Live Script.
B103A = char(0x103A);
B1004 = char(0x1004);
B103A
B103A = '်'
B1004
B1004 = 'င'
S1 = [B103A B1004] %this does not combine, so this is not the proper order
S1 = '်င'
S2 = [B1004 B103A] %this combines, so this is the proper order
S2 = 'င်'
%When I use Livescript, S2 displays in combined form to the command window
%But when I use Mac command window, S2 displays separately.
%I do not have a Windows system handy
%now try plotting with all kinds of fonts
%sorry for all the figures, but this system only displays up to about Ylim 16
FL = setdiff(listfonts(), 'Symbol');
NF = length(FL);
for fidx = 1 : 15 : NF
tF = FL(fidx:min(NF,fidx+14));
fig = figure();
ax = axes('Parent', fig);
for K = 1 : length(tF);
fn = tF{K};
text(1, K, fn + " -> " + S2, 'fontname', fn, 'interpreter', 'tex');
end;
xlim([0 75]); ylim([0 16]);
end
  6 Commenti
v k
v k il 11 Nov 2020
64 (= 2 x 32) plots of empty boxes, and boxes with question marks and 'x' marks inside them ...
But how important is this utility. It eliminates the need to change the font everytime and try the new font. The byproduct of this question is itself of such immense value ...
Walter Roberson
Walter Roberson il 11 Nov 2020
It is disappointing that the controls never seem to render the characters properly at all, and that text() is not able to render the combining codes properly.
The one positive result of this is that it shows that if you are getting just plain emptiness instead of the characters, that changing the font can help to at least get a placeholder.
Note: the 15 fonts per plot was chosen to fit in to the experimental facility I am using to show the results online, which unfortunately does not display large plots without clipping.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by