gisle / encode-locale Goto Github PK
View Code? Open in Web Editor NEWDetermine the locale encoding
Home Page: http://search.cpan.org/dist/Encode-Locale
Determine the locale encoding
Home Page: http://search.cpan.org/dist/Encode-Locale
Update: Thinking more about this, I think it is more an Encode::Alias
issue. Am I correct?
C:\...> set PERL_ENCODE_DEBUG=1 C:\...> cpan-outdated | cpanm delete $Alias{C} at c:/opt/perl-5.20.2/site/lib/Encode/Alias.pm line 100. delete $Alias{ascii} at c:/opt/perl-5.20.2/site/lib/Encode/Alias.pm line 100. delete $Alias{cyrillic} at c:/opt/perl-5.20.2/site/lib/Encode/Alias.pm line 100. delete $Alias{arabic} at c:/opt/perl-5.20.2/site/lib/Encode/Alias.pm line 100. delete $Alias{greek} at c:/opt/perl-5.20.2/site/lib/Encode/Alias.pm line 100. delete $Alias{hebrew} at c:/opt/perl-5.20.2/site/lib/Encode/Alias.pm line 100. delete $Alias{thai} at c:/opt/perl-5.20.2/site/lib/Encode/Alias.pm line 100. Encode::utf8 XS on at c:/opt/perl-5.20.2/site/lib/Encode.pm line 323. eval "\L$1" at c:/opt/perl-5.20.2/site/lib/Encode/Alias.pm line 32. find_alias(Encode, cp65001)->name = at c:/opt/perl-5.20.2/site/lib/Encode/Alias.pm line 75. The locale codeset (cp65001) isn't one that perl can decode, stopped at c:/opt/perl-5.20.2/site/lib/Encode/Locale.pm line 123. Compilation failed in require at c:/opt/perl-5.20.2/site/lib/LWP/UserAgent.pm line 1001. Compilation failed in require at c:\opt\perl-5.20.2\bin/cpan-outdated line 11. BEGIN failed--compilation aborted at c:\opt\perl-5.20.2\bin/cpan-outdated line 11.
Codepage 65001 is the the UTF-8 codepage on Windows, see Code Page Identifiers.
But, I get the following:
C:\...> cpan-outdated | cpanm The locale codeset (cp65001) isn't one that perl can decode, stopped at c:/opt/perl-5.20.2/site/lib/Encode/Locale.pm line 123. Compilation failed in require at c:/opt/perl-5.20.2/site/lib/LWP/UserAgent.pm line 1001. Compilation failed in require at c:\opt\perl-5.20.2\bin/cpan-outdated line 11. BEGIN failed--compilation aborted at c:\opt\perl-5.20.2\bin/cpan-outdated line 11.
Hi,
Is the Encode-Locale component being maintained? It seems like it hasn't been updated for a long time.
^_^
When using Cygwin the t/env.t test fails because only the first 10 tests run. The final 3 tests do not run at all. Changing the number of tests from 13 to 10 causes the results of make test
or prove -b t/*.t
to succeed.
I don't see any reason why perl would skip the last three tests. CPAN Testers, here, shows this module often has trouble in Cygwin. Any ideas as to why this happens or how I can help resolve the issue?
I started a fairly detailed thread on StackOverflow for this problem: http://stackoverflow.com/questions/19772340/lwpuseragents-env-proxy-gives-access-is-denied-for-non-admin-users
Basically, Encode::Locale is used by LWP::UserAgent which is used by LWP::Simple, which I'm trying to use in a CGI script running under IIS with integrated Windows Authentication. That means that the CGI runs as the user logged into IIS, most of whom are NOT admins on the webserver.
Encode::Locale's fallback to calling "chcp" (actually, like this: "qx(chcp)") results in an "Access is denied" error. This is bad enough for Encode::Locale(), but if the CGI includes "use LWP::Simple;" (which is how my script was written), then the error happens at the beginning of the runtime (?), before any of the CGI can be setup, and the webpage user gets an error "The specified CGI application misbehaved by not returning a complete set of HTTP headers".
We need some workaround to NOT use "chcp" in environments like this.
Hi
I uploaded Encode::UTF8Mac module just now.
http://search.cpan.org/perldoc?Encode::UTF8Mac
This provides "utf-8-mac" encoding.
I thought Encode::Locale may use this instead of "utf-8" if $^O eq 'darwin'.
Please check Encode::UTF8Mac.
--- tomita
Win32::GetACP() is available in Win32.pm version 0.45 or later, which has been bundled in Perl 5.18 and later. Given that it is a core module, I think it should always be tried first before loading Win32::API.
I'm working on a PR to address these matters.
Update: #9.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.