delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/05/22/09:27:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <AANLkTini_UcjRIl2pofwHHkoW7tAWWtY2EoqOw4AEjxC@mail.gmail.com>
References: <AANLkTinfzh_OsXWlI-xzEgl5QEn6zBR-_ikaXInnu-Ps AT mail DOT gmail DOT com> <4BF55DF8 DOT 2090007 AT towo DOT net> <AANLkTikH39ppClmi9z_TnZ3GJeIbs0ZuhxWm2yNiGbvs AT mail DOT gmail DOT com> <AANLkTini_UcjRIl2pofwHHkoW7tAWWtY2EoqOw4AEjxC AT mail DOT gmail DOT com>
Date: Sat, 22 May 2010 22:27:43 +0900
Message-ID: <AANLkTil9K6g8VzziQFm_HD_UcrKpKxxp8L6XEOtOJ0T3@mail.gmail.com>
Subject: Re: LANG=ja_JP.Shift_JIS
From: rushojp <rushojp AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

2010/5/21 Andy Koppe <andy DOT koppe AT gmail DOT com>:
>
> So why do you need to set it to ja_JP.Shift_JIS if ja_JP.CP932 and
> ja_JP.SJIS do the same thing?

There is no serious reason.
I think IANA name is more famous.

> I'm not convinced that adding Shift_JIS to Cygwin as another alias for
> CP932 is a good idea, because they aren't actually the same, e.g.
> iconv treats them as different charsets. The SJIS alias is dodgy
> enough already.

Yes, I know it is difficult problem.

@centos5.5
$ echo -ne '\x5c ~ \x81\x60'|iconv -f Shift_JIS -t UTF-16LE|hexdump
0000000 00a5 0020 203e 0020 301c
000000a
$ echo -ne '\x5c ~ \x81\x60'|iconv -f SJIS -t UTF-16LE|hexdump
0000000 00a5 0020 203e 0020 301c
000000a
$ echo -ne '\x5c ~ \x81\x60'|iconv -f CP932 -t UTF-16LE|hexdump
0000000 005c 0020 007e 0020 ff5e
000000a
$ echo -ne '\x5c ~ \x81\x60'|iconv -f Windows-31J -t UTF-16LE|hexdump
0000000 005c 0020 007e 0020 ff5e
000000a

@cygwin-1.7
$ echo -ne '\x5c ~ \x81\x60'|iconv -f Shift_JIS -t UTF-16LE|hexdump
0000000 00a5 0020 203e 0020 301c
000000a
$ echo -ne '\x5c ~ \x81\x60'|iconv -f SJIS -t UTF-16LE|hexdump
0000000 00a5 0020 203e 0020 301c
000000a
$ echo -ne '\x5c ~ \x81\x60'|iconv -f CP932 -t UTF-16LE|hexdump
0000000 005c 0020 007e 0020 301c
000000a
$ echo -ne '\x5c ~ \x81\x60'|iconv -f Windows-31J -t UTF-16LE|hexdump
iconv: conversion from Windows-31J unsupported
iconv: try 'iconv -l' to get the list of supported encodings

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019