Changeset 1062


Ignore:
Timestamp:
2000-04-04T11:23:37+12:00 (24 years ago)
Author:
sjboddie
Message:

got translate.pl to handle umlauts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/translate.pl

    r1060 r1062  
    4242use util;
    4343
    44 # these special characters will currently be replaced by their
    45 # simplified versions (e.g. 'ö' becomes 'o') - a warning will
    46 # be printed if this occurs
    47 my %rmap = ('auml' => 'a',
    48         'euml' => 'e',
    49         'iuml' => 'i',
    50         'ouml' => 'o',
    51         'uuml' => 'u',
    52         'Auml' => 'A',
    53         'Euml' => 'E',
    54         'Iuml' => 'I',
    55         'Ouml' => 'O',
    56         'Uuml' => 'U');
     44# these html entities will be translated correctly when occurring in
     45# images. Any entities not in this list will not.
     46my %rmap = ('auml' => chr (228),
     47        'euml' => chr (235),
     48        'iuml' => chr (239),
     49        'ouml' => chr (246),
     50        'uuml' => chr (252),
     51        'Auml' => chr (196),
     52        'Euml' => chr (203),
     53        'Iuml' => chr (207),
     54        'Ouml' => chr (214),
     55        'Uuml' => chr (220),
     56        'szlig' => chr (223));
    5757
    5858my $hand_made = 0;
     
    151151    my $origtext = $text;
    152152    $text =~ s/&([^;]*);/$rmap{$1}/g;
    153     if ($origtext ne $text) {
    154     print STDERR "WARNING (translate.pl): '$origtext' was converted to '$text' before creating image\n";
    155     }
    156153
    157154    # edit image macros
Note: See TracChangeset for help on using the changeset viewer.