Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Use Swedish with Tcl/Tk

7 views
Skip to first unread message

Malin Gustafsson

unread,
Apr 3, 1996, 3:00:00 AM4/3/96
to
Hi!

I want to use Swedish with Tcl/Tk and we have three characters (å, ä and
ö) that gives me some problems.

- When you double click on a word in the text widget the whole word is
not marked since these characters are not taken as part of the word.

- The -nocase switch for the text search command does not work for these
characters.

Do I need to do my own implementations to fix this or is there something
I have missed?

Thanks,
Malin

-------------------------------------------------------------------
Malin Gustafsson Email: ma...@ling.gu.se
Dept. of Linguistics Phone: + 46 31 773 1175
Gothenburg University Fax: + 46 31 773 4853
S-412 98 Göteborg
SWEDEN

John Haxby

unread,
Apr 10, 1996, 3:00:00 AM4/10/96
to
Malin Gustafsson <ma...@ling.gu.se> wrote:
>I want to use Swedish with Tcl/Tk and we have three characters (=E5, =E4 and
>=F6) that gives me some problems.
>
>- When you double click on a word in the text widget the whole word is
>not marked since these characters are not taken as part of the word.

You need to have "#include <locale.h>" in tclAppInit.c and tkAppInit.c and
include a call 'setlocale (LC_ALL, "")' in main() in both those file before
anything else is called.

Basically, Tcl and Tk both use "isalnum()" or similar to determine whether a
character is alphanumeric. To make this work for your locale, you need to
include that call to setlocale() nice and early. You'll also need to set LANG
or LC_TYPE to the right thing in your environment. If you don't know how to
do this, look at the manual page for "setlocale", if it doesn't tell you
directly, there'll be pointers to the right places.

--
John Haxby
These are my opinions, not my employer's.


0 new messages