If text is read in using the xml reader and then rendered (via the gui), newline '\r' symbols show up as boxes at the end of each line. The xml file could strip these out, or alternatively the rendering could ignore '\r's.
I'm using SciTE to edit my xml files (in widestring format), so it could be classed as a problem with that editor (as it generates newlines as \r\n).
'\r' bug with xml reading & render
Its nice having xml as part of the engine, especially since its bundled over the zip reader.
Actually I'll slip another feature request in here. Having int/float functions that return a bool of success would be good, as in:
bool getAttributeValue(int& value, const wchar_t* name)
bool getAttributeValue(float& value, const wchar_t* name)
I prefer the above format due to function overloading (better clarity), as well as the ability to test whether the value was found or not.
Actually I'll slip another feature request in here. Having int/float functions that return a bool of success would be good, as in:
bool getAttributeValue(int& value, const wchar_t* name)
bool getAttributeValue(float& value, const wchar_t* name)
I prefer the above format due to function overloading (better clarity), as well as the ability to test whether the value was found or not.
Thx to this post and because I also had those "black boxes" in GUI elements at the end of sentences read from and xml file, i have fixed it as follow :
in bool CXMLReaderImpl::setText(char_type* start, char_type* end) :
i replaced :
by :
A bit of an axe fix, but well, it seems to work... what about this bug/fix ?
in bool CXMLReaderImpl::setText(char_type* start, char_type* end) :
i replaced :
Code: Select all
// set current text to the parsed text, and replace xml special characters
core::string<char_type> s(start, (int)(end - start));
NodeName = replaceSpecialCharacters(s);
Code: Select all
// set current text to the parsed text, and replace xml special characters
core::string<char_type> s(start, (int)(end - start));
s.replace('\r',' ');
NodeName = replaceSpecialCharacters(s);