[R] non-ascii characters in TclTk

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sun Dec 30 11:09:46 CET 2007


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