Bugzilla – Attachment 13264 Details for
Bug 9010
Quote of the day: diacritics & other utf8 chars not displayed correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9010 - Follow up Quote of the day: Umlauts do not display correctly
Bug-9010---Follou-up-Quote-of-the-day-Umlauts-do-n.patch (text/plain), 2.03 KB, created by
Marc Véron
on 2012-11-06 13:01:10 UTC
(
hide
)
Description:
Bug 9010 - Follow up Quote of the day: Umlauts do not display correctly
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2012-11-06 13:01:10 UTC
Size:
2.03 KB
patch
obsolete
>From 1f9fc498c8b7f9ed9e21df29771ff30243f47f1f Mon Sep 17 00:00:00 2001 >From: Marc Veron <veron@veron.ch> >Date: Tue, 6 Nov 2012 13:56:30 +0100 >Subject: [PATCH] Bug 9010 - Follou up Quote of the day: Umlauts do not display correctly >Content-Type: text/plain; charset="utf-8" > >After applying Serhij's patch I had still troubles with umlauts, e.g. while editing or adding a new quote. > >Added explicit utf-8 encoding at 3 places. >--- > tools/quotes/quotes_ajax.pl | 9 ++++++--- > 1 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/tools/quotes/quotes_ajax.pl b/tools/quotes/quotes_ajax.pl >index 528c3dd..da5dc01 100755 >--- a/tools/quotes/quotes_ajax.pl >+++ b/tools/quotes/quotes_ajax.pl >@@ -58,10 +58,11 @@ if ($params->{'action'} eq 'add') { > my $new_quote_id = $dbh->{q{mysql_insertid}}; # ALERT: mysqlism here > $sth = $dbh->prepare('SELECT * FROM quotes WHERE id = ?;'); > $sth->execute($new_quote_id); >- print to_json($sth->fetchall_arrayref); >+ print to_json($sth->fetchall_arrayref, {utf8 =>1}); > exit 1; > } > elsif ($params->{'action'} eq 'edit') { >+ my $aaData = []; > my $editable_columns = [qw(source text)]; # pay attention to element order; these columns match the quotes table columns > my $sth = $dbh->prepare("UPDATE quotes SET $editable_columns->[$params->{'column'}-1] = ? WHERE id = ?;"); > $sth->execute($params->{'value'}, $params->{'id'}); >@@ -71,7 +72,9 @@ elsif ($params->{'action'} eq 'edit') { > } > $sth = $dbh->prepare("SELECT $editable_columns->[$params->{'column'}-1] FROM quotes WHERE id = ?;"); > $sth->execute($params->{'id'}); >- print $sth->fetchrow_array(); >+ $aaData = $sth->fetchrow_array(); >+ print Encode::encode('utf8', $aaData); >+ > exit 1; > } > elsif ($params->{'action'} eq 'delete') { >@@ -106,5 +109,5 @@ else { > iTotalDisplayRecords=> $iTotalDisplayRecords, > sEcho => $params->{'sEcho'}, > aaData => $aaData, >- }); >+ }, {utf8 =>1}); > } >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9010
:
13250
|
13262
|
13263
|
13264
|
13328
|
13329
|
13330
|
13985