Article View: pl.comp.lang.perl
Article #52377odgrzewane utf8 locale
From: washide
Date: Mon, 30 Jan 2012 12:05
Date: Mon, 30 Jan 2012 12:05
35 lines
1980 bytes
1980 bytes
Jak to działa : ( pewnie było to napisane i przemielone 150 razy ale
nie rozumiem jak zachodzi pewna funkcjonalniość )
założenie : locale
LANG=pl_PL.UTF-8
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=
W skrypt.perl:
$str="Ścióka";
print "$str\n";
no i w termianalu pokaże polskie znaki poprawnie.
Ale skoro natywne kodowanie jest latin 1 bo is_utf nie jest równe 1
to na podstawie jakiego mechanizmu mam polskie znaki w terminalu?
if ( utf9::is_utf($str)) =! 1 )
{
print "no utf8\n";
}
Technical Details
Message-ID:
<9398459b-30ee-4d16-a891-6be82bb295ad@c13g2000yqk.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!postnews.google.com!c13g2000yqk.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!postnews.google.com!c13g2000yqk.googlegroups.com!not-for-mail From: washide <yoawaoy@gmail.com> Newsgroups: pl.comp.lang.perl Subject: odgrzewane utf8 locale Date: Mon, 30 Jan 2012 04:05:41 -0800 (PST) Organization: http://groups.google.com Lines: 37 Message-ID: <9398459b-30ee-4d16-a891-6be82bb295ad@c13g2000yqk.googlegroups.com> NNTP-Posting-Host: 213.227.101.55 Mime-Version: 1.0 X-Trace: posting.google.com 1327925141 31128 127.0.0.1 (30 Jan 2012 12:05:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 30 Jan 2012 12:05:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c13g2000yqk.googlegroups.com; posting-host=213.227.101.55; posting-account=SBycvgkAAADamTvCZmAlf2k1il34U7-j User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.1.16) Gecko/20110929 Iceweasel/3.5.16 (like Firefox/3.5.16),gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit