|
From: SourceForge.net <no...@so...> - 2008-09-16 02:13:08
|
Bugs item #2112563, was opened at 2008-09-15 13:04 Message generated for change (Comment added) made by kakaroto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=2112563&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 88. Themed Tk Group: current: 8.5.4 Status: Open Resolution: None Priority: 7 Private: No Submitted By: Alaoui Youness (kakaroto) Assigned to: Joe English (jenglish) Summary: Tk is not safe against extensions that call setlocale(). Initial Comment: Hi, Tcl/Tk 8.5 had a huge refactoring in order to become locale-independent. The problem is that I'm using an extension which calls : setlocale(LC_ALL, "") on a french desktop, and this causes Tk to report an error. There are still some 'sprintf' calls in tk's source which are causing this issue. The code to reproduce the error, as well as it's output is here : http://pastebin.com/m14756d67 You can replace the 'package require farsight' by a 'load' to any extension doing a : setlocale(LC_ALL, "fr_FR.UTF-8@euro"); I did a grep on tk's 8.5.4 source and here's the list of sprintf's being used : kakaroto% grep -r printf * | grep "%g" generic/ttk/ttkScroll.c: sprintf(args, " %g %g", generic/ttk/ttkScroll.c: sprintf(buf, "%g %g", generic/tkScrollbar.c: sprintf(buf, "%g", fraction); generic/tkScrollbar.c: sprintf(buf, "%g", fraction); generic/tkArgv.c: sprintf(tmp, "%g", *((double *) infoPtr->dst)); generic/tkEntry.c: sprintf(buf, "%g %g", first, last); generic/tkEntry.c: sprintf(args, " %g %g", first, last); generic/tkEntry.c: sprintf(buf, "%g %g", first, last); generic/tkCanvText.c: sprintf(buffer, "] %d %g %g %s %s DrawText\n", generic/tkListbox.c: sprintf(buf, "%g %g", fraction, fraction2); generic/tkListbox.c: sprintf(buf, "%g %g", fraction, fraction2); generic/tkListbox.c: sprintf(string, " %g %g", first, last); generic/tkListbox.c: sprintf(string, " %g %g", first, last); macosx/tkMacOSXScrlbr.c: sprintf(valueString, "%g", newFirstFraction); macosx/tkMacOSXScrlbr.c: sprintf(valueString, "%g", macosx/tkMacOSXScrlbr.c: sprintf(valueString, "%g", win/tkWinScrlbr.c: sprintf(valueString, "%g", pos); Thanks, KaKaRoTo ---------------------------------------------------------------------- Comment By: Alaoui Youness (kakaroto) Date: 2008-09-15 22:13 Message: Hi, it seems dkf updated the category to Themed Tk (ttk?), but I'm not sure how your categorization works, but it looks to me like it's wrong. Yes, the ttk/ttkScroll.c has this sprintf issue, but there are other native Tk widgets with the same issue (tkScrollbar, tkArgv, tkEntry, tkCanvText, tkListbox and windows/mac scrollbars). Anyways, I hope this gets fixed soon! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=2112563&group_id=12997 |