Ignore:
Timestamp:
2010-09-06T19:08:11+12:00 (14 years ago)
Author:
davidb
Message:

Further adjustments to our reading in of text files/data to be Unicode aware. These changes address the issue of when the data being read in is in a different encoding. The key 'problem' was that the (now) Unicode aware was being erroneously being re-encoded within HTMLPlugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm

    r22842 r22857  
    12961296
    12971297    $$text =~ s/\s+/ /g; # remove \n's
     1298
     1299    # At this point $$text is a binary byte string
     1300    # => turn it into a Unicode aware string, so full
     1301    # Unicode aware pattern matching can be used.
     1302    # For instance: 's/\x{0101}//g' or '[[:upper:]]'
     1303    #
     1304
     1305    $$text = decode("utf8",$$text);
    12981306}
    12991307
Note: See TracChangeset for help on using the changeset viewer.