From: SourceForge.net <no...@so...> - 2006-06-15 02:23:57
|
Bugs item #1497990, was opened at 05/31/06 00:28 Message generated for change (Settings changed) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1497990&group_id=10894 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: 10. Objects Group: current: 8.4.13 >Status: Closed Resolution: Wont Fix Priority: 5 Submitted By: ghanke (ghanke) Assigned to: Don Porter (dgp) Summary: expr sqrt(2) returns 1,41421356237.0 after loading and using Initial Comment: TCL-Version: 8.4.13 OS: Windows 2000 SP4 / Windows XP SP2 Locale Settings: DE - decimal symbol: , - digit grouping symbol . After loading and using some packages the float arithmetic is dead... puts [expr sqrt(2)] # => 1,41421356237.0 In consequence tkcon (and any text widget too) is annoying me with errors... This occurs rarely. On Win 2000 SP4 with tcom creating wmi objects, and with tclodbc when using the ODBC driver "Pervasive ODBC Client Interface" ve SQL affected fresh compiled TCL 8.4.12 (msys-mingw8) has this bug too. The problem disappears using "." for decimal symbol (Windows Control Center) After some investigation I figure out this is not a TCL bug but a bug in the sprintf function. This function returns sometimes a ',' as decimal point Perhaps take a hammer and blast them: Insert in generic/tclUtil.c (Tcl_PrintDouble) something like if (*p == ',') { *p = '.'; } ... Greetings Goeran ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 06/14/06 19:23 Message: Logged In: YES user_id=1312539 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 05/31/06 09:34 Message: Logged In: YES user_id=80530 Tcl 8.5 is immune to this. Workaround for 8.4 is not to use broken extensions. If someone else has more sympathy, they're welcome to pick this up. I have no plans to work on it. ---------------------------------------------------------------------- Comment By: ghanke (ghanke) Date: 05/31/06 04:26 Message: Logged In: YES user_id=1511137 strtod is also affected, so "expr 1.0" fails... This can be fixed by adding strtod.$(OBJEXT) to COMPAT_OBJS ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 05/31/06 01:01 Message: Logged In: YES user_id=79902 The problem is that some drivers insist on setting the locale. Thanks a bunch, Oracle. (Same problem occurs with some HP printer drivers IIRC.) I believe this is fixed in 8.5 (by no longer using sprintf() to format numbers) and I believe the workaround for 8.4 is to reset the locale after loading the database drivers. I can't quite remember if that can be done at the Tcl level on Windows, or if it needs a little C code. :-( Leaving open for area maintainer (well, someone more knowledgable than me) to comment. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1497990&group_id=10894 |