Changeset 23514
- Timestamp:
- 2010-12-20T00:22:43+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/unicode.pm
r23387 r23514 633 633 if ((defined $and_numeric_entities) && ($and_numeric_entities)) { 634 634 $text =~ s/\&\#x([0-9A-F]+);/pack('C', hex($1))/ige; 635 $text =~ s/\&\# ([0-9]+);/pack('C', $1)/ige;635 $text =~ s/\&\#u?([0-9]+);/pack('C', $1)/ige; 636 636 } 637 637 … … 764 764 = map { $_ > 255 ? # Needs to be represent in entity form 765 765 sprintf("&#x%X;",$_) : 766 $_ > 128? # Representable in %XX form766 $_>128 || $_==ord("%") ? # Representable in %XX form 767 767 sprintf("%%%2X", $_) : 768 768 chr($_) # otherwise, Ascii char
Note:
See TracChangeset
for help on using the changeset viewer.