Skip to content

Commit

Permalink
Fix Image::Magick version to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jun 19, 2024
1 parent efe8f60 commit 2fbee32
Showing 1 changed file with 44 additions and 13 deletions.
57 changes: 44 additions & 13 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ if($opts{'B'}) {
my $magick;
if($^O eq 'linux') {
# Debian lacks ImageMagick-7
$magick = 'Image::Magick 6.9.12-2';
$magick = 'Image::Magick 6.9.13-6';
} else {
$magick = 'Image::Magick';
}
Expand Down Expand Up @@ -4205,7 +4205,7 @@ sub print_person
my @childnames;
while(my ($key, $value) = each %childmap) {
push @childnames,
conjunction(map { given_names($_) } @{$value}) .
conjunction(map { given_names($_) || 'Unknown' } @{$value}) .
i18n(' with ') .
$key
}
Expand Down Expand Up @@ -12625,6 +12625,8 @@ sub person_in_residence_record
}

# Encode to HTML whatever the non-ascii encoding scheme has been chosen
# Can't use HTML:Entities::encode since that doesn't seem to cope with
# all encodings and misses some characters
#
# See https://www.compart.com/en/unicode/U+0161 etc.
# https://www.compart.com/en/unicode/U+00EB
Expand Down Expand Up @@ -12685,6 +12687,7 @@ sub wide_to_html
$string =~ s//'/g;
$string =~ s//'/g;
$string =~ s//'/g;
$string =~ s/\x98/'/g;
}

if($string !~ /[^[:ascii:]]/) {
Expand All @@ -12693,20 +12696,27 @@ sub wide_to_html

$string =~ s/\xc2\xa3/£/g;
$string =~ s/\xc2\xa9/©/g;
$string =~ s/\xc2\xab/"/g; # «
$string =~ s/\xc2\xae/®/g;
$string =~ s/\xc2\xbb/"/g; # »
$string =~ s/\xc3\x81/Á/g; # Á
$string =~ s/\xc3\x83/Î/g; # Î
$string =~ s/\xc3\x9e/Þ/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\xb0/ð/g; # ð
$string =~ s/\xc3\xb4/ô/g; # ô
$string =~ s/\xc3\xb6/ö/g;
$string =~ s/\xc3\xb8/ø/g; # ø
$string =~ s/\xc5\xa1/š/g;
$string =~ s/\xc4\x8d/č/g;
$string =~ s/\xc5\xbe/ž/g;
$string =~ s/\xc3\xa5/å/g; # å
$string =~ s/\xc3\xa7/ç/g;
$string =~ s/\xc3\xaf/ï/g; # ï
$string =~ s/\xc3\xb3/ó/g;
$string =~ s/\xc3\x96/Ö/g; # Ö
$string =~ s/\xc3\xa8/è/g;
Expand All @@ -12717,9 +12727,11 @@ sub wide_to_html
$string =~ s/\xc3\xae/î/g;
$string =~ s/\xc3\xbb/û/g;
$string =~ s/\xc3\xbc/ü/g; # ü
$string =~ s/\xc3\xbe/þ/g; # þ
$string =~ s/\xc5\x9b/ś/g;
$string =~ s/\xc5\xa0/Š/g;
$string =~ s/\xe2\x80\x93/–/g;
$string =~ s/\xe2\x80\x94/—/g;
$string =~ s/\xc3\xb1/ñ/g; # ñ
$string =~ s/\xe2\x80\x9c/"/g;
$string =~ s/\xe2\x80\x9d/"/g;
Expand All @@ -12728,33 +12740,42 @@ sub wide_to_html
$string =~ s/\N{U+00A0}/ /g;
$string =~ s/\N{U+00A3}/£/g,
$string =~ s/\N{U+00A9}/©/g;
$string =~ s/\N{U+00AB}/"/g; # «
$string =~ s/\N{U+00AE}/®/g;
$string =~ s/\N{U+00BB}/"/g; # »
$string =~ s/\N{U+00CE}/Î/g; # Î
$string =~ s/\N{U+00DE}/Þ/g; # Þ
$string =~ s/\N{U+0161}/š/g;
$string =~ s/\N{U+010D}/č/g;
$string =~ s/\N{U+017E}/ž/g;
$string =~ s/\N{U+00C9}/É/g;
$string =~ s/\N{U+00D6}/Ö/g; # Ö
$string =~ s/\N{U+00DF}/ß/g; # ß
$string =~ s/\N{U+00E1}/á;/g;
$string =~ s/\N{U+00E2}/â/g;
$string =~ s/\N{U+00E4}/ä/g;
$string =~ s/\N{U+00E5}/å/g; # å
$string =~ s/\N{U+00E7}/ç/g; # ç
$string =~ s/\N{U+00E8}/è/g;
$string =~ s/\N{U+00E9}/é/g;
$string =~ s/\N{U+00ED}/í/g; # í
$string =~ s/\N{U+00EE}/î/g;
$string =~ s/\N{U+00D6}/Ö/g; # Ö
$string =~ s/\N{U+00E7}/ç/g; # ç
$string =~ s/\N{U+00EF}/ï/g; # ï
$string =~ s/\N{U+00F0}/ð/g; # ð
$string =~ s/\N{U+00F4}/ô/g; # ô
$string =~ s/\N{U+00F6}/ö/g;
$string =~ s/\N{U+00F8}/ø/g; # ø
$string =~ s/\N{U+00FC}/ü/g; # ü
$string =~ s/\N{U+00FE}/þ/g; # þ
$string =~ s/\N{U+00C1}/Á/g; # Á
$string =~ s/\N{U+00CA}/ê/g;
$string =~ s/\N{U+00EB}/ë/g;
$string =~ s/\N{U+00F3}/ó/g;
$string =~ s/\N{U+015B}/ś/g;
$string =~ s/\N{U+00FB}/û/g;
$string =~ s/\N{U+0160}/Š/g;
$string =~ s/\N{U+2013}/–/g;
$string =~ s/\N{U+2014}/—/g;
$string =~ s/\N{U+201C}/"/g;
$string =~ s/\N{U+201D}/"/g;
$string =~ s/\N{U+2026}/.../g; #
Expand Down Expand Up @@ -12804,6 +12825,7 @@ sub wide_to_html
# $string =~ s/\N{U+0160}/Š/g; # FIXME: also above
# $string =~ s/\N{U+2013}/-/g;

$string =~ s/Á/Á/g;
$string =~ s/å/å/g;
$string =~ s/š/š/g;
$string =~ s/Š/Š/g;
Expand All @@ -12816,22 +12838,27 @@ sub wide_to_html
$string =~ s/ç/ç/g;
$string =~ s/ê/ê/g;
$string =~ s/ë/ë/g;
$string =~ s/ð/ð/g;
$string =~ s/í/í/g;
$string =~ s/ï/ï/g;
$string =~ s/Î/&Iicrc;/g;
$string =~ s/©/©/g;
$string =~ s/®/®/g;
$string =~ s/ó/ó/g;
$string =~ s/ô/ô/g;
$string =~ s/ö/ö/g;
$string =~ s/ø/ø/g;
$string =~ s/ś/ś/g;
$string =~ s/Þ/Þ/g;
$string =~ s/þ/þ/g;
$string =~ s/û/û/g;
$string =~ s/ü/ü/g;
$string =~ s/£/£/g;
$string =~ s/ß/ß/g;
$string =~ s//–/g;
$string =~ s//—/g;
$string =~ s/ñ/ñ/g;
$string =~ s//"/g;
$string =~ s//"/g;
$string =~ s/[“”«»]/"/g;
$string =~ s//.../g;
$string =~ tr/\x80/ /;

Expand All @@ -12849,14 +12876,18 @@ sub wide_to_html

# print STDERR __LINE__, ": ($string)\n";
if($string =~ /[^[:ascii:]]/) {
print STDERR (unpack 'H*', $string);
print STDERR __LINE__, ': ';
print STDERR (sprintf '%v02X', $string), "\n";
my $i = 0;
while((my @call_details = caller($i++))) {
print STDERR "\t", colored($call_details[2] . ' of ' . $call_details[1], 'red'), "\n";
complain("TODO: wide_to_html($string)");
$string = HTML::Entities::encode($string);
if($string =~ /[^[:ascii:]]/) {
print STDERR (unpack 'H*', $string);
print STDERR __LINE__, ': ';
print STDERR (sprintf '%v02X', $string), "\n";
my $i = 0;
while((my @call_details = caller($i++))) {
print STDERR "\t", colored($call_details[2] . ' of ' . $call_details[1], 'red'), "\n";
}
die "BUG: wide_to_html($string)";
}
die "BUG: wide_to_html($string)";
}

return $string;
Expand Down

0 comments on commit 2fbee32

Please sign in to comment.