This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: API request: export internal_setlocale
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Mon, 8 Feb 2010 10:40:16 +0100
- Subject: Re: API request: export internal_setlocale
- References: <416096c61002071157p359daef0k45548dc80b6873b9@mail.gmail.com>
- Reply-to: cygwin-developers at cygwin dot com
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