Watch window: Improperly formatted XML data?
While using Decoda to debug some code which messes around with dumped functions, I've found an odd behaviour of the watch window.
When adding the output from string.dump as a watch (for example, the minimal string.dump(function() end) or string.dump on a more complex function), the value column displays "Improperly formatted XML data".
1) This string is not XML nor should it be
2) Even if it was improper XML, I would want to see the contents of the string so that I knew why it was improper
[attachment=35801:Image1.png]
When adding the output from string.dump as a watch (for example, the minimal string.dump(function() end) or string.dump on a more complex function), the value column displays "Improperly formatted XML data".
1) This string is not XML nor should it be
2) Even if it was improper XML, I would want to see the contents of the string so that I knew why it was improper
[attachment=35801:Image1.png]
Comments
<a href="http://img507.imageshack.us/my.php?image=image1oi6.png" target="_blank"><img src="http://img507.imageshack.us/img507/5130/image1oi6.th.png" border="0" class="linked-image" /></a>
Embedded zeros are displayed in the value for "\" but not for "\", and taking a slightly longer substring of a string gives a completely different value (shown again with constructing the strings from character values rather than substrings).
The reason that "\" and "\" .. "\" are displayed differently in the watch window has to do with how Decoda handles wide character strings. Because Lua does not have a separate wide character string type, some developers choose to just store wide character strings in the the normal string type. To support this, Decoda attempts to discern whether the string is ASCII or wide character, and in the first case it decided it was ASCII with an embedded zero and in the second case it decided it was a wide character string. We hope to improve the display of this information and the user's control over how it's displayed soon.