Re: Decoding CJK characters to unicode in Tcl



jhe...@xxxxxxxxx wrote:
How can I display CJK characters using the font option in Tcl? i.e.
% puts "\u592a\u9177" ?-font {-family ? -size ? -weight ?}

Hmm, some confusion there I see. The [puts] commmand just writes the
characters to some channel (stdout by default). It doesn't do the
display. Instead, display is done by either the OS's terminal or by
Tk, depending on factors you've not told us (e.g. what platform are
you on, what Tcl-enabled program are you running in). The OS's
terminal is outside our control, but anything in Tk is OK (including
the fake terminal provided by wish on Win and OSX). But it turns out
that Tk does font composition for you by default, so it should "Just
Work" (with varying degrees of beauty depending on the selected font);
the selection of a font for a widget (which are the things that accept
a -font option) is just so that things look good, and not so that
characters show at all.

Donal.

.



Relevant Pages

  • Re: CListCtrl unicode doesnt display korean characters correctly
    ... Use the "MS Mincho" font for my application: Ugly for non-chinese characters but works ... I first entered kanji Unicode data as showed by Character Map Windows ... do display (or maybe the height is too small, ...
    (microsoft.public.vc.mfc)
  • How to do this (listbox control)
    ... so I can display the contents of a std::map ... The 'obvious' way of doing this (storing the entire unfiltered data in some variable/class and then filtering and re-populating the second list, based on selection in first list), seems a bit 'clunky', and I am not yet familiar with VB's classes to know how to improve on this - help is appreciated. ... as the user types in text, the first characters typed in used to match entries that begin with the typed characters - all other entries will be removed. ...
    (microsoft.public.vb.general.discussion)
  • Re: VIM 7.0 under Windows and Unicode fonts
    ... characters. ... font "Fixedsys" doesn't display many of the characters correctly. ... and Cyrillic for Lucida Console). ...
    (comp.editors)
  • Re: Fractions Behaving Badly in Browsers
    ... If the reader is upset by the font style, the solution would be to get ... a font which contains all of the relevant characters. ... reader's display ... the correct glyph is important. ...
    (comp.fonts)
  • Re: Characters displayed small
    ... > and in a different font face. ... that your problem is more about the correct display of utf-8 chars and ... This applies to all accented characters. ...
    (comp.emacs)