home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 243,040 of 243,242   
   Janis Papanagnou to Lynn McGuire   
   Re: "Internationalis(z)ing Code - Comput   
   26 Jan 26 01:00:15   
   
   XPost: comp.lang.fortran, comp.lang.c++   
   From: janis_papanagnou+ng@hotmail.com   
      
   On 2026-01-25 22:21, Lynn McGuire wrote:   
   >> Lynn McGuire  schrieb:   
   >>>   
   >>> [...] I've got enough problems without having to deal with localization.   
      
   Getting all right if implementing things from scratch is demanding.   
   (Luckily software and systems nowadays handle that for us.)   
      
   $ LC_NUMERIC=de_DE.UTF-8 printf "%9.3f\n" 1.234,567   
     1234,567   
   $ LC_NUMERIC=en_US.UTF-8 printf "%9.3f\n" 1,234.567   
     1234.567   
      
   > BTW, I don't put commas in my 12 digit printed numbers because I sell   
   > 40% of my software outside the USA, just periods.   
      
   That, OTOH, is just the trivial part. Even some old languages (like   
   Simula) allowed to change the decimal mark character for read/write   
   of real numbers. Since you just need that function on the interface   
   level it can be done in one place (presuming you use the respective   
   function, or redefine your own); the internal representation may be   
   all the same. So just define the numeric separators in the program's   
   environment.   
      
   > Shoot, people can't   
   > even agree on periods or commas for the fractional part.   
      
   Are you really complaining about characteristics of people's (or   
   nation's) historic conventions?   
      
   They typically use what's defined in their nation. (What's actually   
   supported by the respective locale for that language/nation.) It's   
   hard to change long used common habits. (See introduction of the SI   
   units in the USA, for example.) I think they usually also don't need   
   to change their habits. Only in case of international cooperation we   
   need to distinguish the [external] representation. (Our IT, software   
   systems, and programmers certainly can handle that.)   
      
   Personally I'm using the "C" locale for numeric representations in   
   my private computing. But I'm used to write numbers like "1234.567",   
   where non-IT people might not be used to it.   
      
   Though even long existing software doesn't get localization sensibly   
   implemented (despite they're technically using locales). But that's   
   another story.   
      
   Janis   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca