Pedro Lopez-Cabanillas wrote:
> On Friday 11 February 2005 20:51, Chris Cannam wrote:
>>
>> -- locale is set such that strtod(3) expects ',' for a decimal point
>> (but why should it differ between different builds?)
>
> Indeed, this was easy to test. Changing mappings/feta.xml to use a comma
> instead the decimal point solves the clef position and line thickness
> problems.
>
> Which is exactly the expected and matches my es_ES locale. I need to
> investigate a bit more, but I'm very tired now. See you tomorrow.
Does this patch fix your rendering problem in the Spanish locale?
I know it doesn't temporarily restore the saved LC_NUMERIC locale as it should
whenever the user enters a floating-point string in the GUI but it
wouldn't be much work to make it do that as well in the necessary places.
Is GUI str->f.p. done anywhere else apart from RosegardenFloatEdit+ TempoDialog?
William
--- a/rosegarden/gui/main.cpp 2005-02-11 10:02:12.000000000 +0000
+++ b/rosegarden/gui/main.cpp 2005-02-12 08:02:51.000000000 +0000
@@ -403,6 +403,7 @@
exit(1);
}
+char *savedUserLocale;
int main(int argc, char *argv[])
{
@@ -467,6 +468,12 @@
//
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ savedUserLocale = setlocale(LC_NUMERIC, NULL);
+ if (savedUserLocale) {
+ savedUserLocale = strdup(savedUserLocale);
+ setlocale(LC_NUMERIC, "C");
+ }
+
// Show Startup logo
// (this code borrowed from KDevelop 2.0,
// (c) The KDevelop Development Team