Re: Decoding CJK characters to unicode in Tcl
- From: "Donal K. Fellows" <donal.k.fellows@xxxxxxxxx>
- Date: 20 Mar 2007 09:09:44 -0700
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.
.
- References:
- Decoding CJK characters to unicode in Tcl
- From: jhe618
- Re: Decoding CJK characters to unicode in Tcl
- From: suchenwi
- Re: Decoding CJK characters to unicode in Tcl
- From: jhe618
- Re: Decoding CJK characters to unicode in Tcl
- From: Michael Schlenker
- Re: Decoding CJK characters to unicode in Tcl
- From: jhe618
- Decoding CJK characters to unicode in Tcl
- Prev by Date: Re: windows file property "title" attribute?
- Next by Date: Re: windows file property "title" attribute?
- Previous by thread: Re: Decoding CJK characters to unicode in Tcl
- Next by thread: Re: Decoding CJK characters to unicode in Tcl
- Index(es):
Relevant Pages
|