X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Sun, 24 Jan 2010 10:53:52 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Please support CP932. (I have problem using subversion with   SJIS)
Message-ID: <20100124095352.GC2402@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <e22ab97b1001222149r3c217decmb0da069d7049c896@mail.gmail.com>  <20100123135020.GW2402@calimero.vinschen.de>  <20100123150703.GY2402@calimero.vinschen.de>  <416096c61001230751m308ac854x4f026b1f83b966d0@mail.gmail.com>  <20100123164546.GZ2402@calimero.vinschen.de>  <416096c61001231431u7e67cd37r2e741d0cb48c732f@mail.gmail.com>  <20100124093750.GA2402@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100124093750.GA2402@calimero.vinschen.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
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 Jan 24 10:37, Corinna Vinschen wrote:
> On Jan 23 22:31, Andy Koppe wrote:
> > Corinna Vinschen:
> > > I applied a patch which handles the characters 0x5c and 0cfe differently
> > > if the charset is set to "SJIS"
> > 
> > Something's going seriously wrong with this, and I'd suspect it's to
> > do with turning backslashes into yen symbols.
> 
> Right.  It occured to me tonight that this will not work from a
> filesystem point-of-view.  The people who decided to overload backslash
> and tilde in the ASCII range with different symbols in SJIS still need
> some serious knock on their heads.  No wonder the Microsoft guys kept
> the binary values of characters intact, especially due to the backslash
> problem.
> 
> > Not sure what could be done about it. Remove SJIS support in favour of CP932?
> 
> In theory, we could be able to keep SJIS support in.  The
> Cygwin-internal function converting multibyte strings to Unicode
> filenames would have to use CP932.  Only on the application level the
> conversion would use SJIS.
> 
> There's no system API which takes wchar_t strings, so all strings are
> exchanged between application and system using multibyte strings.  Since
> the multibytes strings are the same, that should give a round-trip which
> still works for Win32 filenames:
> 
> Input string:  "\x5e\xfe"
> 
> Application:     mbstowcs ("\x5e\xfe")      ==> L"\x00a5\x203e"
>                  wcstombs (L"\x00a5\x203e") ==> "x5e\xfe"
> 
> Cygwin       sys_mbstowcs ("\x5e\xfe")      ==> L"\x005e\x007e"
>              sys_wcstombs (L"\x005e\x007e") ==> "x5e\xfe"

...and, if we implement it that way, do we really still need support
for a "CP932" charset?

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

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

