Skip to content

Commit

Permalink
Encode the pound symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jun 14, 2024
1 parent 5666b68 commit 7214285
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -14040,38 +14040,40 @@ sub wide_to_html
return $string;
}

$string =~ s/\xc2\xa3/£/g;
$string =~ s/\xc2\xa9/©/g;
$string =~ s/\xc2\xae/®/g;
$string =~ s/\xc3\xa1/á/g;
$string =~ s/\xc3\xa2/â/g;
$string =~ s/\xc3\xa4/ä/g;
$string =~ s/\xc3\xa9/é/g;
$string =~ s/\xc3\xad/í/g; # í
$string =~ s/\xc3\xb4/ô/g; # ô
$string =~ s/\xc3\xb6/ö/g;
$string =~ s/\xc5\xa1/š/g;
$string =~ s/\xc4\x8d/č/g;
$string =~ s/\xc5\xbe/ž/g;
$string =~ s/\xc3\xa7/ç/g;
$string =~ s/\xc3\xb3/ó/g;
$string =~ s/\xc3\xbc/ü/g; # ü
$string =~ s/\xc3\x96/Ö/g; # Ö
$string =~ s/\xc3\x96/Ö/g; # Ö
$string =~ s/\xc3\xa8/è/g;
$string =~ s/\xc3\x89/É/g;
$string =~ s/\xc3\x9f/ß/g;
$string =~ s/\xc3\xaa/ê/g;
$string =~ s/\xc3\xab/ë/g;
$string =~ s/\xc3\xae/î/g;
$string =~ s/\xc3\xb1/ñ/g; # ñ
$string =~ s/\xc3\xbb/û/g;
$string =~ s/\xc3\xad/&iacute/g; # í
$string =~ s/\xc3\x9f/ß/g; # ß
$string =~ s/\xc3\xbc/ü/g; # ü
$string =~ s/\xc5\x9b/ś/g;
$string =~ s/\xc5\xa0/Š/g;
$string =~ s/\xe2\x80\x93/–/g;
$string =~ s/\xc3\xb1/ñ/g; # ñ
$string =~ s/\xe2\x80\x9c/"/g;
$string =~ s/\xe2\x80\x9d/"/g;
$string =~ s/\xe2\x80\xa6/.../g; #
$string =~ s/\xe2\x80\xa6/.../g;

$string =~ s/\N{U+00A0}/ /g;
$string =~ s/\N{U+00A3}/£/g,
$string =~ s/\N{U+00A9}/©/g;
$string =~ s/\N{U+00AE}/®/g;
$string =~ s/\N{U+0161}/š/g;
Expand Down Expand Up @@ -14192,7 +14194,6 @@ sub wide_to_html
print STDERR (unpack 'H*', $string);
print STDERR __LINE__, ': ';
print STDERR (sprintf '%v02X', $string), "\n";
print STDERR "\n";
my $i = 0;
while((my @call_details = caller($i++))) {
print STDERR "\t", colored($call_details[2] . ' of ' . $call_details[1], 'red'), "\n";
Expand Down Expand Up @@ -14289,6 +14290,7 @@ sub wide_to_xml
# print STDERR (sprintf '%v02X', $string);
# print STDERR "\n";

$string =~ s/\xc2\xa3/£/g; # £
$string =~ s/\xc2\xa9/©/g;
$string =~ s/\xc2\xae/®/g;
$string =~ s/\xc3\xa1/á/g;
Expand Down

0 comments on commit 7214285

Please sign in to comment.