Changeset 23831


Ignore:
Timestamp:
03/28/11 15:12:13 (10 years ago)
Author:
ak19
Message:

Fixed a minor off by one error: wide characters printed are to be printed as unicode if greater than 127 (instead of testing for greater than 128).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/unicode.pm

    r23750 r23831  
    760760{
    761761    join("",
    762          map { $_ > 128 ?                      # if wide character...
     762         map { $_ > 127 ?                      # if wide character...
    763763                   sprintf("\\x{%04X}", $_) :  # \x{...}
    764764                   chr($_)         
     
    774774    = map { $_ > 255 ?                  # Needs to be represent in entity form
    775775            sprintf("&#x%X;",$_) : 
    776             $_>128 || $_==ord("%") ?              # Representable in %XX form
     776            $_>127 || $_==ord("%") ?              # Representable in %XX form
    777777            sprintf("%%%2X", $_) : 
    778778            chr($_)                 # otherwise, Ascii char
     
    807807
    808808    my @url_encoded_chars
    809     = map { $_ > 128 ?                  # Representable in %XX form
     809    = map { $_ > 127 ?                  # Representable in %XX form
    810810            sprintf("%%%2X", $_) : 
    811811            chr($_)                 # otherwise, Ascii char
Note: See TracChangeset for help on using the changeset viewer.