delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/09/25/20:25:54

X-Spam-Check-By: sourceware.org
Message-ID: <45736.38.112.225.178.1159230279.squirrel@38.112.225.178>
In-Reply-To: <1939582260.20060925153017@gmail.com>
References: <1026800198 DOT 20060923122829 AT ukr DOT name> <6363 DOT 24 DOT 19 DOT 24 DOT 170 DOT 1159170710 DOT squirrel AT 24 DOT 19 DOT 24 DOT 170> <1939582260 DOT 20060925153017 AT gmail DOT com>
Date: Mon, 25 Sep 2006 17:24:39 -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:
> YST> Letting perl know what the encoding of your data is should enable /i
> to work
> YST> correctly.  How you would do this depends on what exactly you are
> doing; it
> YST> may just require a "use encoding 'cp1251';".  (I assume 2151 was a
> typo.)
>
> Well, all I got was perfectly formed UTF8 output, and this is
> not what I've been looking for because now I need somehow to
> convert UTF8 input to CP1251 to be able to use for database
> query and ... yes, again do case-insensitive regex on it.

I'm not sure what you mean by that last part, but if you need to
explicitly use it as cp1251, you'd do $cp1251_octets =
Encode::encode('cp1251', $data).


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