Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » U++ 2017 beta
Re: U++ 2017 beta [message #47333 is a reply to message #47151] Thu, 05 January 2017 05:01 Go to previous messageGo to previous message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
About decimal comma.

Well, in Java world you should always provide also the Locale to be used by the formatter. So then you do thing like str = Format(Locale.US, "%.2f", value) when you are exporting data for machine, or you call with other (none=default) to get formatting for human output, which can include also things like thousands separator/etc (and is not suitable for machine export/import).

Tom1:

BTW, if your OS (GTK) is set to ",", then it sort of does what it should, and I would rather like to see introduction of this Java-like "provide target Locale" logic, than some hardcoded hacks to get "." every time. As when you want to format numbers for your human users, you should follow their OS settings.

I do believe that you can set locale to the "C" even in your source even now (maybe at the start of application, if you don't want to format outputs with default OS settings), to get the printf behaviour with dot. Too lazy to google for some example, sorry. Smile

[Updated on: Thu, 05 January 2017 05:05]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: upp-10502-winxp32-compiled
Next Topic: On-line meeting before 2017 release
Goto Forum:
  


Current Time: Tue May 07 22:36:23 CEST 2024

Total time taken to generate the page: 0.01839 seconds