Version 6 of encoding names

Updated 2007-05-21 17:59:53 by wjp

encoding names

Returns a list containing the names of all of the encodings that are currently available.

If Tk is loaded, the encoding "X11ControlChars" will be included in the list. This is not a real encoding but a kludge used to arrange for a character that has no representation in any available font to be converted to a \xnn or \unnnn string and displayed in an ISO8859-1 font. For example:

 puts [encoding convertto X11ControlChars "a"]

produces "\x61". WJP 2007-05-21.

DGP In what way does that make the "X11ControlChars" not a real encoding? If encoding names returns it, then encoding convertto, for example, can use it, right?

"X11ControlChars" is not a real encoding in the sense that it has no existence out in the world. You won't find any standard by that name, any font with that encoding, or any piece of text in this encoding. And therefore, it won't do a user any good to choose it in an attempt to make sense of a piece of text. So it isn't the same sort of thing as iso8859-1 or Big5. I don't deny that it has a reality of a sort, but it is something purely internal to the implementation of Tk. WJP


See also:


Tcl syntax help - Category Command - Category Introspection