Hi,

On 29 September 2017 at 17:07, Guy Rutenberg <[email protected]> wrote:

> Hi,
>
> On 26 September 2017 at 18:28, T. Modes <[email protected]> wrote:
>
> Okay, I found the ticket: http://trac.wxwidgets.org/ticket/16206
>> It is indeed fixed upstreams in the 3.1 series, but not in there 3.0.x
>> series
>> Maybe Fedora has applied this fix to their packages (but I could not find
>> it. Maybe somebody else can check this).
>> The best way would be to ask the Debian packages to apply this patch to
>> their wxGTK package (instead of fixing each wxExecute in Hugin. This would
>> be a big work.)
>>
>>
Looking again at wxWidgets' ticket, I saw that hugin does not call
wxSetlocale, which means that it doesn't properly inherit the locale from
the environment. I've applied the following patch

--- a/src/hugin1/hugin/huginApp.cpp
+++ b/src/hugin1/hugin/huginApp.cpp
@@ -250,6 +250,7 @@ bool huginApp::OnInit()
     m_xrcPrefix = wxT(INSTALL_XRC_DIR);
     m_DataDir = wxT(INSTALL_DATA_DIR);
     locale.AddCatalogLookupPathPrefix(wxT(INSTALL_LOCALE_DIR));
+    wxSetlocale(LC_ALL, "");
 #endif

     if ( ! wxFile::Exists(m_xrcPrefix + wxT("/main_frame.xrc")) ) {


and it now wxExecute behaves properly. According to libc's docs this should
be done in every localized program.

A C program inherits its locale environment variables when it starts up.
> This happens automatically. However, these variables do not automatically
> control the locale used by the library functions, because ISO C says that
> all programs start by default in the standard ‘C’ locale. To use the
> locales specified by the environment, you must call setlocale. Call it as
> follows:
>
> setlocale (LC_ALL, "");
>
> to select a locale based on the user choice of the appropriate environment
> variables.
>
(https://www.gnu.org/software/libc/manual/html_node/Setting-the-Locale.html)




> Thanks! I've sent a bug report to Debian, and I hope they would be able to
> apply this patch.
>
>
Meanwhile, the Debian maintainer asked the wxWidgets team to backport their
patch to the official 3.0 branch.

Thanks,
Guy

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/CADfV-LFghPcOYw3qE3waVg_QZRXZU4AcLKwVDm68CPy3E8ZaqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to