API request: export internal_setlocale

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Feb 8 09:40:00 GMT 2010


On Feb  7 19:57, Andy Koppe wrote:
> And now that I'm thinking about it, I realise that mintty's Ctrl+click
> feature for opening a file has much the same issue and ought to do the
> same process in reverse. But all this could be avoided if mintty was
> able to change its filename charset to that of its child process.
> 
> Therefore it would be really nice if Cygwin's internal_setlocale(void)
> function, which changes the filename/console charset according to the
> currently selected LC_CTYPE locale, could be exported from the DLL.
> Perhaps as a case for cygwin_internal()?

I can add that as cygwin_internal(CW_INT_SETLOCALE), that's not a big
problem.  However, are you aware that this might result in weird
problems?  Names of files (objects in general) which are already open in
the application will potentially be using the wrong encoding afterwards.
If the application uses only ASCII chars up to the point it calls
cygwin_internal(CW_INT_SETLOCALE) that shouldn't matter, but I don't
give any guarantees that this will work as expected.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-developers mailing list