delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/09/25/03:52:03

X-Spam-Check-By: sourceware.org
Message-ID: <6363.24.19.24.170.1159170710.squirrel@24.19.24.170>
In-Reply-To: <1026800198.20060923122829@ukr.name>
References: <1026800198 DOT 20060923122829 AT ukr DOT name>
Date: Mon, 25 Sep 2006 00:51:50 -0700 (PDT)
Subject: Re: Perl's use locale don't work on Cygwin ?
From: "Yitzchak Scott-Thoennes" <sthoenna AT efn DOT org>
To: cygwin AT cygwin DOT com
User-Agent: SquirrelMail/1.5.0
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

Sergei Kolodka wrote:
> Just wonder is whole Perl's "use locale" and "setlocale()" thing doesn't
> works on Cygwin or I'm just too dumb to find out how to use it ?

It works just fine for all locales supported by cygwin, which is just the
"C" locale :)

> Yes, I know that locale on Cygwin not implemented, but maybe there
> are some other way to at least enable correct /i in non-ASCII Perl
> regexes (Russian CP2151 for example) I'm not aware of ?

Letting perl know what the encoding of your data is should enable /i to work
correctly.  How you would do this depends on what exactly you are doing; it
may just require a "use encoding 'cp1251';".  (I assume 2151 was a typo.)

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

- Raw text -


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