Changeset 9983


Ignore:
Timestamp:
2005-05-30T15:07:04+12:00 (19 years ago)
Author:
mdewsnip
Message:

Fixed a bug in read_file where characters read weren't converted to unsigned chars, causing problems with non-ASCII documents.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/fileutil.cpp

    r9593 r9983  
    435435    file_in.get(c);
    436436    while (!file_in.eof ()) {
    437       content.push_back(c);
     437      // Casting c to an unsigned char is vital when reading non-ASCII documents
     438      content.push_back((unsigned char) c);
    438439      file_in.get(c);
    439440    }
Note: See TracChangeset for help on using the changeset viewer.