On Sunday 13 February 2005 17:09, Silvan wrote:
> On Sunday 13 February 2005 03:51 am, Pedro Lopez-Cabanillas wrote:
> > Thanks for your help. Perhaps this bug only appears on certain package
> > versions. If this is true, and somebody else complains we can simply ask
> > for an upgrade of the relevant packages. And update the software
> > requirements and/or the FAQ in the web site.
>
> Mayhap, but it would still be nice to figure out exactly what interaction
> of package versions is causing this.  As it is, all we can really say is
> "If you are running Mandrake 9.2 in a country that uses a comma as a
> decimal separator, you *may* experience bizarre problems with the notation
> editor, and with printing.  If this proves to be the case, your only
> recourse it to upgrade your entire distro, or switch to a REAL language,
> like  English, because everyone in the world speaks English anyway, as you
> are proving by reading this FAQ, and because we don't understand the
> underlying mechanism that causes this breakage, and we figured nobody would
> still be running that old thing anyway, so you're just screwed.  Have a
> nice day."

At this point we already know which packages are involved in this issue. The  
main guilty has been a set of LADSPA plugins (shared libraries), calling to  
setlocale(3) in their initialization. This function belongs to the GNU C 
library, and allows a program to be translated using gettext(3). When the 
library calls this function, the whole process changes its locale 
environment. KDE programs use its own i18n infrastructure, not needing 
setlocale() at all. Seems that KDE 3.1/Qt 3.1 needs the locale to be set to 
"C" (default) to perform some tasks reliably. In our case, the tasks were 
QString.toDouble() used to read some XML data files, and the print subsystem 
and print preview window writing postscript data files. In both cases the 
problems were reading a period as decimal point where a comma was expected, 
or writting a comma instead a period to the postscript streams. 

We didn't noticed this issue before, because the enumeration of DSSI and 
LADSPA plugins was performed by the sequencer process, while the other tasks 
were done by the GUI process. In order to optimize communications between the 
sequencer and the GUI at startup, all tasks are now performed by the GUI.

We took two actions to fix both problems. First was to switch from  
QString.toDouble() to qstrtodouble(), see rosestrings.cpp:40. toDouble() was 
using strtod(3) in Qt3.1 and 3.2, but changed to another implementation in 
Qt3.3, and all of them are locale sensitive. Second, it was necessary to 
restore the default locale ("C") after the enumeration of the plugins. See 
PluginFactory.cpp:106. This fixed the printing problems too.

Regards,
Pedro









-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to