Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
b32a0b43
Commit
b32a0b43
authored
Mar 28, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 550765: Unicode strings from install_string were showing up as garbage
when used in the web interface r=LpSolit, a=LpSolit
parent
e8f93b1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
Util.pm
Bugzilla/Install/Util.pm
+3
-1
checksetup.pl
checksetup.pl
+6
-0
No files found.
Bugzilla/Install/Util.pm
View file @
b32a0b43
...
@@ -265,6 +265,8 @@ sub install_string {
...
@@ -265,6 +265,8 @@ sub install_string {
die
"No language defines the string '$string_id'"
die
"No language defines the string '$string_id'"
if
!
defined
$string_template
;
if
!
defined
$string_template
;
utf8::
decode
(
$string_template
)
if
!
utf8::
is_utf8
(
$string_template
);
$vars
||=
{};
$vars
||=
{};
my
@replace_keys
=
keys
%
$vars
;
my
@replace_keys
=
keys
%
$vars
;
foreach
my
$key
(
@replace_keys
)
{
foreach
my
$key
(
@replace_keys
)
{
...
@@ -281,7 +283,7 @@ sub install_string {
...
@@ -281,7 +283,7 @@ sub install_string {
}
}
$string_template
=~
s/\Q##$key##\E/$replacement/g
;
$string_template
=~
s/\Q##$key##\E/$replacement/g
;
}
}
return
$string_template
;
return
$string_template
;
}
}
...
...
checksetup.pl
View file @
b32a0b43
...
@@ -62,6 +62,12 @@ use Bugzilla::Install::Util qw(install_string get_version_and_os init_console);
...
@@ -62,6 +62,12 @@ use Bugzilla::Install::Util qw(install_string get_version_and_os init_console);
# When we're running at the command line, we need to pick the right
# When we're running at the command line, we need to pick the right
# language before ever displaying any string.
# language before ever displaying any string.
init_console
();
init_console
();
# Required for displaying strings from install_string, which are always
# in UTF-8, in every language. For other scripts, Bugzilla::init_page
# handles this, but here we just need to assume that checksetup.pl output
# is always UTF-8 in order for install_string to work properly in other
# languages.
binmode
STDOUT
,
':utf8'
;
my
%
switch
;
my
%
switch
;
GetOptions
(
\%
switch
,
'help|h|?'
,
'check-modules'
,
'no-templates|t'
,
GetOptions
(
\%
switch
,
'help|h|?'
,
'check-modules'
,
'no-templates|t'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment