From: Jakub Narebski <jnareb@gmail.com>
To: "Michał Kiedrowicz" <michal.kiedrowicz@gmail.com>
Cc: git@vger.kernel.org, Jakub Narebski <jnareb@gmail.com>
Subject: Re: [RFC PATCH] gitweb: use CGI with -utf8
Date: Thu, 02 Feb 2012 12:01:41 -0800 (PST) [thread overview]
Message-ID: <m37h05c8c1.fsf@localhost.localdomain> (raw)
In-Reply-To: <1328136653-20559-1-git-send-email-michal.kiedrowicz@gmail.com>
Michał Kiedrowicz <michal.kiedrowicz@gmail.com> writes:
> I noticed that gitweb tries a lot to properly process UTF-8 data, for
> example it prints my name correctly in log and commit information, but
> it echos junk in the search field. It looks like:
>
> MichaÅ Kiedrowicz
>
> I don't know CGI well and I never touched gitewb code, but I found this
> on http://www.lemoda.net/cgi/perl-unicode/index.html:
>
> use CGI '-utf8';
> my $value = params ('input');
>
> I tried it and that fixed my problem. I'm not sure about the
> consequences, maybe someone more experienced in CGI might help?
I have reworded this to form a proper commit message (see
Documentation/SubmittingPatches) and I'll resend this as a reply to
this email.
> ---
> gitweb/gitweb.perl | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index abb5a79..74d45b1 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -10,7 +10,7 @@
> use 5.008;
> use strict;
> use warnings;
> -use CGI qw(:standard :escapeHTML -nosticky);
> +use CGI qw(:standard :escapeHTML -nosticky -utf8);
> use CGI::Util qw(unescape);
> use CGI::Carp qw(fatalsToBrowser set_message);
> use Encode;
> --
Does this actually work for you? Because it doesn't work for me
(perhaps I have too old CGI module: what CGI.pm and what Perl version
do you use?).
See other solution to this in other reply to this email.
--
Jakub Narebski
next prev parent reply other threads:[~2012-02-02 20:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 22:50 [RFC PATCH] gitweb: use CGI with -utf8 Michał Kiedrowicz
2012-02-02 20:01 ` Jakub Narebski [this message]
2012-02-02 20:08 ` [PATCH/RFC (version A)] gitweb: use CGI with -utf8 to process Unicode query parameters correctly Jakub Narebski
2012-02-02 20:11 ` Jakub Narebski
2012-02-02 20:43 ` Michał Kiedrowicz
2012-02-02 20:10 ` [PATCH/RFC (version B)] gitweb: Allow UTF-8 encoded CGI query parameters and path_info Jakub Narebski
2012-02-02 20:46 ` Michał Kiedrowicz
2012-02-02 21:07 ` Jakub Narebski
2012-02-02 22:57 ` Jakub Narebski
2012-02-03 7:39 ` Michal Kiedrowicz
2012-02-03 12:44 ` [PATCH/RFCv2 " Jakub Narebski
2012-02-03 17:45 ` Michał Kiedrowicz
2012-02-03 21:09 ` Junio C Hamano
2012-02-02 20:38 ` [RFC PATCH] gitweb: use CGI with -utf8 Michał Kiedrowicz
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=m37h05c8c1.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=michal.kiedrowicz@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).