X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 29 Jan 2010 22:11:25 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Japanese/Chinese language question Message-ID: <20100129211125.GC28659@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20100121134055 DOT GE2402 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Jan 30 05:00, Kazuhiro Fujieda wrote: > >>> On Thu, 21 Jan 2010 14:40:55 +0100 > >>> Corinna Vinschen said: > > > When comparing strings linguistically (strcoll/wcscoll), > > > > - are Hiragana and Katakana forms of the same character to be > > treated as equal or as different? > > They should be treated as different. > > > - are half-width and full-width forms of the same CJK character > > treated as equal or as different? > > Different, too. > > It is difficult to implement the collation algorithm from > scratch. I recommend to use LCMapString to generate sort keys. Yes, that's how I implemented it. strcoll/wcscoll are using CompareStringW, strxfrm/wcsxfrm are using LCMapStringW. I was just asking because I wasn't sure if I had to use the NORM_IGNOREKANATYPE and NORM_IGNOREWIDTH flags or not. But another look into the definition of strcoll/strxfrm answered the question eventually. Thanks, Corinna -- 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