From 1a9133bf9b5d281766af17cd3c2e34ab2d5880ea Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 13 Jun 2004 12:56:39 +0000 Subject: [PATCH] Unicode fix svn path=/trunk/; revision=9662 --- .../system/explorer/utility/xmlstorage.h | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/explorer/utility/xmlstorage.h b/reactos/subsys/system/explorer/utility/xmlstorage.h index cf143350012..5fed7e82fc6 100644 --- a/reactos/subsys/system/explorer/utility/xmlstorage.h +++ b/reactos/subsys/system/explorer/utility/xmlstorage.h @@ -1376,10 +1376,26 @@ struct XMLDoc : public XMLNode tifstream in(path); XMLReader reader(this, in); - return read(reader, path); + return read(reader, String(path)); } - bool read(XMLReaderBase& reader, const char* display_path="") + bool read(XMLReaderBase& reader) + { + XML_Status status = reader.read(); + + if (status == XML_STATUS_ERROR) { + std::ostringstream out; + + out << "input stream" << reader.get_position() << " " << reader.get_error_string(); + + _last_error = reader.get_error_code(); + _last_error_msg = out.str(); + } + + return status != XML_STATUS_ERROR; + } + + bool read(XMLReaderBase& reader, const string& display_path) { XML_Status status = reader.read();