X-Spam-Check-By: sourceware.org
Date: Thu, 16 Mar 2006 15:52:10 -0500
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: fopen with UTF-8 chars in filenames
Message-ID: <20060316205210.GD14672@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <Pine.LNX.4.63.0603141507100.23743@vgfl.cnhywyhpnf.bet> <dv7oht$t87$1@sea.gmane.org> <20060315010359.GD15036@trixie.casa.cgf.cx> <dvchcb$p9k$1@sea.gmane.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <dvchcb$p9k$1@sea.gmane.org>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Thu, Mar 16, 2006 at 01:21:28PM -0700, Cary Jamison wrote:
>Christopher Faylor wrote:
>>On Tue, Mar 14, 2006 at 05:53:14PM -0700, Cary Jamison wrote:
>>>Paul J.  Lucas wrote:
>>>>Is this known to work (or not work)?  Apparently, it doesn't.
>>>>
>>>>FYI: I'm writing JNI code.  The strings passed from Java to C are
>>>>UTF-8.  A string containing a non-ASCII character, e.g., an 'e' with an
>>>>accent, works fine with fopen() under Mac OS X.  The same JNI code
>>>>under Cygwin fails.
>>>
>>>I'm not positive about this, but you may have to convert the UTF-8 to
>>>UTF-16 (Windows unicode) and call wfopen() instead of fopen().  But
>>>wfopen() is a Windows call, not a cygwin call :-(
>>
>>Which would strongly imply that calling wfopen was not the right
>>solution for Cygwin.
>>
>>This is sort of like asking for an expert legal opinion on US law and
>>quoting Canadian law...
>
>True, but at least I gave him options; no one else responded with even
>a 'not possible on cygwin.'

I don't know if doing what the OP wants is possible on Cygwin but it is
hard to see that proposing an option that won't work with Cygwin would
be particularly useful.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

