Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6185281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:41:04+00:00 2026-05-24T01:41:04+00:00

My locale setting is utf8, so, when starting plackup the date strings are localized

  • 0

My locale setting is utf8, so, when starting plackup the date strings are localized too. Therefore I getting console access-log like the following:

$ plackup a.psgi 
HTTP::Server::PSGI: Accepting connections at http://0:5000/
127.0.0.1 - - [24/júl/2011:12:15:44 +0200] "GET / HTTP/1.1" 200 11 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3"
                   ^- garbage

my partial a.psgi:

use 5.014;
use warnings;
use utf8;
use open qw(:std :utf8); #the problem....
use Encode;

use Plack::Builder;

use MyApp;
my $runner = MyApp->new(...);
my $app = sub {
    $runner->run(shift);
};

builder {$app;};

The problematic line is the open pragma. (I need the open pragma in MyApp). Without it, the the acccess log correctly print Júl, with it the access log got garbages.

So, How to fix my access log?

  • for either garbage-free printouts of localized date strings, or
  • converting access-log messages into C-locale

Any idea?

Ps: I know, than PSGI is byte oriented specification (and MyApp correctly handling it), but this problem is outside of MyApp.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:41:04+00:00Added an answer on May 24, 2026 at 1:41 am

    I think your open pragma is too broad. You say you need it, but did not name the details. You should be able to restrict it to the streams you’re only using explicitely.

    If that’s too difficult to figure out, simply straighten out the IO layer for the STDERR stream where the log messages go:

    binmode STDERR, ':bytes';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any possibility to extract globalize2 translation for specified locale without setting I18n.locale
When I run perl , I get the warning: perl: warning: Setting locale failed.
In Python I can use locale.format to pretty-print numbers according to locale setting: >>>
I am getting the following error: $ rake db:drop (in D:/Repository/MyApp) ~ [datamapper] Setting
I'm getting this warning: perl: warning: Please check that your locale settings: LANGUAGE =
Aside from the GL Support, is there a way to override locale settings with
By default in windows application setting are saved in this directory: %USERPROFILE%\Local Settings\Application Data\<Company
What is the purpose of this Rails config setting... config.action_controller.consider_all_requests_local = true It's set
I have read many posts about setting up unit testing in Zend Framework and
I have installed maven 2.2.1 on my debian machine and getting the following error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.