|
From: | David White |
Subject: | Re: [Wesnoth-dev] locale-independant number parsing |
Date: | Wed, 09 Feb 2005 18:02:29 -0600 |
User-agent: | Mozilla Thunderbird 0.8 (Windows/20040913) |
Yann Dirson wrote:
Are there any places in Wesnoth where floating point numbers are output in a user context (i.e. not debugging)?On Mon, Feb 07, 2005 at 10:16:44PM +0100, Guillaume Melquiond wrote:Sorry, you have lost me here. An "easy way" to handle what? You didn't explain the problem you are trying to solve here, so I can't really say if your solution is fine or not.Uh, sure :) The problem is, your fix completely disables the locale processing for everything but messages. As you noted, that means printing of decimal numbers will use the US format instead of the locale-based one.
Anyhow, using functions which are only available on some platforms to solve a problem only solves the problem on some platforms. If a problem is worth solving, then it's worth solving right, I think.
A possible solution would be to write our own decimal number parsing function, and not set the locale to the US locale.
David
[Prev in Thread] | Current Thread | [Next in Thread] |