Changeset 23285 for main/trunk/greenstone2/perllib/util.pm
- Timestamp:
- 2010-11-03T17:52:09+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/util.pm
r23284 r23285 1374 1374 } 1375 1375 1376 # To print UTF8 (unicode) for debugging:1377 # Characters that are easily displayed (that is, printable ASCII)1378 # are shown as-is, whereas hexcodes are shown for all other chars.1379 # Useful method for debugging when doing encoding related work.1380 sub debug_unicode_string1381 {1382 join("",1383 map { $_ > 128 ? # if wide character...1384 sprintf("\\x{%04X}", $_) : # \x{...}1385 chr($_)1386 } unpack("U*", $_[0])); # unpack Unicode characters1387 }1388 1389 1376 1;
Note:
See TracChangeset
for help on using the changeset viewer.