From: Alexey Tourbin <at@altlinux.ru>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] perl и unicode
Date: Sat, 12 Apr 2008 21:17:49 +0400
Message-ID: <20080412171749.GA13411@solemn.turbinal> (raw)
In-Reply-To: <200804111340.47797.boris@office.etersoft.ru>
[-- Attachment #1: Type: text/plain, Size: 966 bytes --]
On Fri, Apr 11, 2008 at 01:40:47PM +0400, Boris Savelev wrote:
> Здравствуйте!
> Столкнулся с проблемой использования юникода в перле, а именно (cgi тест)
> #!/usr/bin/perl -W
> use strict;
> print "Content-type: text/plain; charset=UTF-8\n\n";
> my $text;
> my $text_lc;
> $text="БОЛЬШОЙ!маленький!small!BIG!";
> $text_lc=lc($text);
> print "Env 'PERL_UNICODE' is ";
> print ${^UNICODE};
> print "\n";
> print "Run test: \n";
> print "Source text\n";
> print $text;
> print "\n";
> print "Text after LowerCase\n";
> print $text_lc;
>
> Текст написан в UTF8.
> В таком виде тест не проходит, т.е. большие русские символы маленькими не
> становятся, хотя с латинскими все прекрасно.
> Далее если в начале добавить:
> use utf8;
> то тест отрабатывается, но:
> Starting from Perl 5.8.0, the use of use utf8 is no longer necessary
> (http://perldoc.perl.org/perluniintro.html)
use utf8 в данном случае нужен, прочитайте 'perldoc utf8'.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2008-04-12 17:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-11 9:40 Boris Savelev
2008-04-11 9:46 ` Boris Savelev
2008-04-11 22:21 ` Кокарев Константин
2008-04-12 17:17 ` Alexey Tourbin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080412171749.GA13411@solemn.turbinal \
--to=at@altlinux.ru \
--cc=sisyphus@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git