[R] non-ascii characters in TclTk

Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com
Sun Dec 30 12:53:15 CET 2007


Thank you, Peter!

The Unicode sequence "\u00e2" for "â" is the ticket.  

While it is true that I can just use â in my TclTk code, when I use
package.skeleton(name="unicode test"), the R code changes my unacceptable â
to <e2> to indicate an error.  My code will still run, of course, but
doesn't display as expected (or does display as expected, depending on your
expectations).  ~:-)

Your Unicode suggestion fixes all that.  The package.skeleton() likes the
escape sequence and the resulting TclTk widget displays the â as desired.

Thank you!

Charles Annis, P.E.

Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 
-----Original Message-----
From: Peter Dalgaard [mailto:p.dalgaard at biostat.ku.dk] 
Sent: Sunday, December 30, 2007 5:10 AM
To: Charles.Annis at statisticalengineering.com
Cc: 'RHelp'
Subject: Re: [R] non-ascii characters in TclTk

Charles Annis, P.E. wrote:
> Greetings, R-Helpers:
>
> A year ago or so I was able to use the non-ascii character â in my TclTk.
> (You can type it on Windows as <alt>0226)  I can use something like
> expression(hat(a)) elsewhere in R, but I seem to be doing something wrong
> when I try that syntax in TclTk.  The widget will run but it displays
> something frightening like R-call_lang 019C8480 019A7724 where I expected
to
> see â.
>
>   
Nothing frightening or unexpectable about that.... If you pass an 
expression, Tcl will think it is a callback. You shouldn't expect 
plotmath features to work outside of plots.

> Can anyone suggest how to use the a with caret in a TclTk widget?
>   
Can't you just type it in inside a string? Otherwise, Unicode escapes 
like "\u00e2" should do it.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list