diff options
author | Torbjörn Andersson | 2006-06-20 22:50:27 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-06-20 22:50:27 +0000 |
commit | 49af7d44c2e799dda335687ae803c27a7c3bd1c1 (patch) | |
tree | 12f31c8f265c7a88ef07127dad94cd3f80859cb3 /tools/credits.pl | |
parent | 49a2f44944675253a13f3b6a18c627a1dd7be2d8 (diff) | |
download | scummvm-rg350-49af7d44c2e799dda335687ae803c27a7c3bd1c1.tar.gz scummvm-rg350-49af7d44c2e799dda335687ae803c27a7c3bd1c1.tar.bz2 scummvm-rg350-49af7d44c2e799dda335687ae803c27a7c3bd1c1.zip |
Applied patches from bug report #1276480, "GUI: Accented characters". This
changes quite a lot of things in the font renderer and the convbdf tools, so
there may be regressions, but we want this feature for 0.9.0.
svn-id: r23208
Diffstat (limited to 'tools/credits.pl')
-rwxr-xr-x | tools/credits.pl | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/tools/credits.pl b/tools/credits.pl index 45c66abed6..c1a5fd47b9 100755 --- a/tools/credits.pl +++ b/tools/credits.pl @@ -85,6 +85,25 @@ sub html_entities_to_ascii { return $text; } +# Convert HTML entities to C++ characters +sub html_entities_to_cpp { + my $text = shift; + + $text =~ s/á/\\341/g; + $text =~ s/é/\\351/g; + $text =~ s/ó/\\363/g; + $text =~ s/ø/\\370/g; + $text =~ s/ł/l/g; + + $text =~ s/ä/\\344/g; + $text =~ s/ö/\\366/g; + $text =~ s/ü/\\374/g; + + $text =~ s/&/&/g; + + return $text; +} + # Convert HTML entities to RTF codes sub html_entities_to_rtf { my $text = shift; @@ -240,11 +259,11 @@ sub begin_section { if ($section_level eq 0) { # TODO: Would be nice to have a 'fat' or 'large' mode for # headlines... - $title = html_entities_to_ascii($title); + $title = html_entities_to_cpp($title); print '"\\\\C\\\\c1""'.$title.'",' . "\n"; print '"\\\\C\\\\c0""",' . "\n"; } else { - $title = html_entities_to_ascii($title); + $title = html_entities_to_cpp($title); print '"\\\\C\\\\c1""'.$title.'",' . "\n"; } } elsif ($mode eq "XML") { @@ -364,13 +383,13 @@ sub add_person { } } elsif ($mode eq "CPP") { $name = $nick if $name eq ""; - $name = html_entities_to_ascii($name); + $name = html_entities_to_cpp($name); print '"\\\\C\\\\c0""'.$name.'",' . "\n"; # Print desc wrapped if (length $desc > 0) { - $desc = html_entities_to_ascii($desc); + $desc = html_entities_to_cpp($desc); print '"\\\\C\\\\c2""'.$desc.'",' . "\n"; } } elsif ($mode eq "XML") { |