Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 265180d0e90149d58e7a88abdad6476f03fc374a
Ticket: 3120139fffffffffffffffffffffffffffffffff
Tcl_PrintDouble not locale-safe
User & Date: hobbs on 2010-11-26 23:56:14
Changes

  1. assignee changed to: "kennykb"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    If the locale is set up to not be LC_NUMERIC=C, Tcl_PrintDouble can give odd behavior.
    
    I am able to reproduce this by using a French regional locale (Control Panel -> Regional Locale and Settings), starting python with tkinter, where they have called
    
    locale.setlocale(locale.LC_ALL, '')
    
    but this could occur in other instances of Tcl embedded.  When in this case, Tcl_PrintDouble can produce odd results:
    
    (arelle) 61 % expr 2-0.1
    1,8999999999999999.0
    (arelle) 62 % set tcl_precision 5
    5
    (arelle) 63 % expr 2-0.1
    1,9.0
    
    This is because the .0 tack-on is locale-ignorant.
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "hobbs"
  10. subsystem changed to: "10. Objects"
  11. title changed to: "Tcl_PrintDouble not locale-safe"
  12. type changed to: "Bug"