Tcl/Tk4.0b3 locale problem. 
Author Message
 Tcl/Tk4.0b3 locale problem.

I found this yesterday, quite by chance when I tried to select the word
"Naovely" with a double-click in a text widget (that "i" has two dots,
BTW, and on Solaris 2.4)

Further invesigation (ie RingTFM for ctype) lead me to believe that
I need the environment variable "LC_CTYPE" set to "iso_8859_1" and,
indeed, a noddy C program that calls setlocale(LC_ALL, "") and then
prints out all the alnum characters subsequently rewarded me with the
traditional 36 and all the accented letters.

However, Tcl/Tk doesn't help here: there's no call to setlocale() that I
can find anywhere in the sources for either Tcl or Tk. In fact, I can't
find a mention of "locale" in any of the distribution files.

Since applications are responsible for setting the locale themselves
(libraries don't) I think that both tclAppInit.c and tkAppInit.c need
something like this

        #ifdef HAVE_LOCALE_H
        #include <locale.h>
        #endif

                ...

        main (...) {
                ...
        #if defined(HAVE_SETLOCALE) && defined(LC_ALL)
                setlocale (LC_ALL, "");
        #endif
                ...
        }

and, of course, the appropriate magic in configure.in (about which I
know almost nothing :-)

I'm sure I read somewhere about the fact that a call to setlocale()
had been added to both tclsh and wish and I must admit I was somewhat
surprised to find it missing.

--

ISODE Consortium                                        +44 181 332 9091

These are my opinions and have nothing to do with my employer.



Tue, 11 Nov 1997 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. FILE(1/2): tkMain.c for tcl-dp3.2 and tcl/tk4.0b3

2. installing tk4.0b3 and tcl 7.4b3

3. Canvas problem in tk4.0b3?

4. Canvas problem in tk4.0b3

5. tk4.0b3 versus tk3.6 problems?

6. BUG in tk4.0b3: Mouse grab / menu problem

7. BUG: tk4.0b3: listbox selection problem when following mouse

8. Problem w/Tk4.0b3 and Linux

9. BUG?: Tk4.0b3 'grab' problems

10. Tk4.0b3 Configure Problems???

11. tk4.0b3 scrolling problems.

12. Problems Building tk4.0b3 Under Linux 1.2.0

 

 
Powered by phpBB® Forum Software