[GRASS-dev] Re: [GRASS-user] GRASS6.3 on Windows

Glynn Clements glynn at gclements.plus.com
Mon Aug 27 15:28:35 EDT 2007


Hamish wrote:

> > \xB0 is a degree symbol in ISO-8859-1. If you're using another
> > encoding (e.g. UTF-8), you need to use something else. Some encodings
> > e.g. ISO-8859-5 = Cyrillic) don't have a degree symbol.
> 
> How do other softwares deal with this?
> Would one UTF-8 code cover all of UTF-8 or just one locale? ie if we test
> locale we can cover both ISO-8859-1 and UTF-8 which would cover the
> majority of users, for everyone else we could just make it a blank space.

GUI toolkits often use Unicode internally, in which case, there isn't
a problem (so long as the user's font has a degree symbol).

For locale-based text (e.g. terminal I/O), this can be handled by the
message catalogues; strings won't contain a degree sign in a locale
whose encoding doesn't support it.

Obviously, this requires that you get the string from a message
catalogue in the first place.

> Do tcl/tk text objects have any support for superscripts/tex? I'm
> thinking a lower case "o" placed way up high, ^{o}.

This is available in "text" widgets, but not elsewhere (e.g. text
objects in a canvas widget, or labels).

Current versions of Tk use Unicode internally, but you need to use
"encoding system utf-8" before sourcing a UTF-8 script (by default,
scripts are read according to the locale's encoding).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list