aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorThierry Crozat2013-02-04 13:16:38 +0000
committerThierry Crozat2013-02-04 13:17:18 +0000
commita1c3a8c542082ad67f07f226a5647d79c499f5a5 (patch)
tree8a2a10dfcd3986ad4403aa23e109d00e1b3a3f3d /devtools
parent091f2e9df835cb688db456570862a327e04be748 (diff)
downloadscummvm-rg350-a1c3a8c542082ad67f07f226a5647d79c499f5a5.tar.gz
scummvm-rg350-a1c3a8c542082ad67f07f226a5647d79c499f5a5.tar.bz2
scummvm-rg350-a1c3a8c542082ad67f07f226a5647d79c499f5a5.zip
CREDITS: Fix display of credits with non ISO-8859-1 charsets
The credits.pl script now prints both the ASCII and ISO-8859-1 strings in the credits.dat file when they are different. The About dialog then chooses either one or the other depending on the current charset used. This fixes bug #3539986
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/credits.pl30
1 files changed, 23 insertions, 7 deletions
diff --git a/devtools/credits.pl b/devtools/credits.pl
index ff3b37a5da..28c3139bfd 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -267,14 +267,22 @@ sub begin_section {
print '\f1\b0\fs24 \cf0 \\' . "\n";
} elsif ($mode eq "CPP") {
if ($section_level eq 0) {
- # TODO: Would be nice to have a 'fat' or 'large' mode for
- # headlines...
- $title = html_entities_to_cpp($title);
- print '"C1""'.$title.'",' . "\n";
- print '"",' . "\n";
+ # TODO: Would be nice to have a 'fat' or 'large' mode for
+ # headlines...
+ my $ascii_title = html_entities_to_ascii($title);
+ $title = html_entities_to_cpp($title);
+ if ($ascii_title ne $title) {
+ print '"A1""'.$ascii_title.'",' . "\n";
+ }
+ print '"C1""'.$title.'",' . "\n";
+ print '"",' . "\n";
} else {
- $title = html_entities_to_cpp($title);
- print '"C1""'.$title.'",' . "\n";
+ my $ascii_title = html_entities_to_ascii($title);
+ $title = html_entities_to_cpp($title);
+ if ($ascii_title ne $title) {
+ print '"A1""'.$ascii_title.'",' . "\n";
+ }
+ print '"C1""'.$title.'",' . "\n";
}
} elsif ($mode eq "XML-DOC") {
print " <row><entry namest='start' nameend='job'>";
@@ -392,13 +400,21 @@ sub add_person {
}
} elsif ($mode eq "CPP") {
$name = $nick if $name eq "";
+ my $ascii_name = html_entities_to_ascii($name);
$name = html_entities_to_cpp($name);
+ if ($ascii_name ne $name) {
+ print '"A0""'.$ascii_name.'",' . "\n";
+ }
print '"C0""'.$name.'",' . "\n";
# Print desc wrapped
if (length $desc > 0) {
+ my $ascii_desc = html_entities_to_ascii($desc);
$desc = html_entities_to_cpp($desc);
+ if ($ascii_desc ne $desc) {
+ print '"A2""'.$ascii_desc.'",' . "\n";
+ }
print '"C2""'.$desc.'",' . "\n";
}
} elsif ($mode eq "XML-DOC") {