gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
276 stars 61 forks source link

UFT8 (unicode) problem #1676

Open alaingdl opened 11 months ago

alaingdl commented 11 months ago

I don't know how to name the problem (UTF-8 ? Unicode ??) but when I have some diacritics in titles (accents in French), the output is bad. E.g.

set_plot, 'x'
plot, findgen(10), xtitl='Années', ytitle='coût'
set_plot, 'svg'
device, xsize=10, ysize=5
plot, findgen(10), xtitle='Années', ytitle='coût', charsize=.5
device,/close

gdl

lfoldy commented 11 months ago

IDL expects ASCII or extended ASCII (ISO-8859-1) input, Unicode is not supported. I think GDL does the same.

GillesDuvert commented 11 months ago

Just tested, IDL write accented letters of 'Années' and 'coût' . Normal if the input is ISO-8859-1 . However, impossible to reproduce @alaingdl test with GDL, as the readline() function used in GDL does not register accented letters at all (they are ignored when typing) on my machine, even setting the Konsole input to ISO-8859. More generally, GDL does not care about regionalisation, the ANTLR command parser is not helping either. I note that the plplot package used to draw the plots and labels supports regionalisation. This can be marked as a feature request, and probably a not urgent one at that.