cygwin_conv_path POSIX->WIN_A conversion

Eric Blake eblake@redhat.com
Fri Nov 11 16:28:00 GMT 2011


On 11/11/2011 07:46 AM, Corinna Vinschen wrote:
> So I was wondering if the CCP_POSIX_TO_WIN_A function shouldn't be
> changed so that it converts the pathname to the current ANSI or OEM
> charset instead, depending on the value returned by the AreFileApisANSI
> function.

Yes, that sounds right to me,

> 
> I think this would be more correct than converting to the current Cygwin
> multibyte charset.  The downside is, that this *might* break backward
> compatibility.  However, if an application converts a Cygwin POSIX path
> to a native Windows multibyte path, isn't it always for the sake of
> calling a Win32 ANSI function or to submit the path to a native Windows
> application?

Precisely for this reason - the only sane reason to convert to native is
to use the resulting string in native calls.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20111111/fb1b8b24/attachment.sig>


More information about the Cygwin-developers mailing list