Peeking a character as it turns out is a really bad idea as it involves the encoder
to pull characters. If the PeekChar happens to read a byte that is part of a
UTF8 string that needs more characters to process we would end up with the reported
crash.
Atsushi Enomoto tracked this down, and the fix is to use the binaryreader.BaseStream
to directly call into ReadByte and Read without ever probing with PeekChar (). It
is not really possible to use BinaryReader.ReadByte since this one can throw on
end-of-buffer conditions instead of returning -1
* XmlDictionaryWriter.cs : try to lookup dictionary string in
WriteNode(). This is part of #577139 fix (probably).
svn path=/trunk/mcs/; revision=151191
* XmlBinaryDictionaryWriter.cs : for text '0' and '1', write 0x82 and
0x84 instead of 0x99 [0x30|0x31]. This cosmetic fix gives identical
writer output for #577139 (and yet it still doesn't work).
svn path=/trunk/mcs/; revision=151173
* XmlDictionaryReader.cs: Fix ReadValueAsBase64 return value and
remove NET_2_1 (gui-compare shows this in our 3.0 SP1 profile)
svn path=/trunk/mcs/; revision=147250
* XmlSimpleDictionaryWriter.cs : fix bogus import of
XmlWriter.WriteNode() to handle more than two elements.
* XmlSimpleDictionaryWriterTest.cs : test WriteNode() to not skip more
than two nodes in an element.
svn path=/trunk/mcs/; revision=137485
* XmlBinaryDictionaryReader.cs : fix GetAttribute() that returns
attributes from cache that are *not* in current element.
svn path=/trunk/mcs/; revision=135517
* XmlBinaryDictionaryReader.cs : there was wrong reusage of nodes
when the node was at the top of the stack. It was added twice and
call to reset resulted in end element with empty names.
* XmlBinaryDictionaryReaderTest.cs : verify that end element has
non-empty local name.
svn path=/trunk/mcs/; revision=135512
* XmlBinaryDictionaryWriter.cs : allow mapping an identical prefix
to different xmlns in different element level.
* XmlBinaryDictionaryWriterTest.cs : added test for failing duplicate
namespace declaration in the same element context.
svn path=/trunk/mcs/; revision=135052
* XmlBinaryDictionaryReader.cs : fix utf16 array on getting its
length. Report correct length (since BinaryReader is directly used
it makes no sense to incompletely keep track of position in Source).
* XmlBinaryDictionaryReaderTest.cs : added test for utf16 chars.
svn path=/trunk/mcs/; revision=134388
* UniqueId.cs: Fix attributes for v3.5 (and later 2.0 SP) and remove
them (in particular [SecurityTreatAsSafe]) from the NET_2_1 build.
svn path=/trunk/mcs/; revision=133716
* XmlBinaryDictionaryReader.cs : several fixes;
- Name property was always empty.
- Value property was always empty for attributes.
- TextIndex node type was not supported.
- node reset at Read() was incomplete.
- attribute Prefix for single character had wrong value.
- namespace nodes did not appear as attribute nodes.
- attribute value node must be always single. Another text node
means a text child of the element, not the following attr value.
tests will go in sys.servicemodel.
svn path=/trunk/mcs/; revision=132879
* XmlBinaryDictionaryReader.cs, XmlDictionaryWriter.cs :
a couple of fixes to reflect correct values for node properties
on each read step.
* XmlBinaryDictionaryReaderTest.cs: make tests more doubtful on
state.
svn path=/trunk/mcs/; revision=130655
* XmlBinaryDictionaryReader.cs, XmlBinaryDictionaryWriter.cs
XmlBinaryFormat.cs : implemented element with short prefix.
* XmlBinaryDictionaryReaderTest.cs,
XmlBinaryDictionaryWriterTest.cs : added test for element with
short prefix.
svn path=/trunk/mcs/; revision=130617
* XmlBinaryDictionaryWriter.cs : further namespace refactory.
namespaces are managed by its own (to work fine for both string
and dictionary string).
svn path=/trunk/mcs/; revision=130396
* XmlBinaryFormat.cs, XmlBinaryDictionaryReader.cs,
XmlBinaryDictionaryWriter.cs : improved shorthanded prefix
support. Not only autocreated prefixes but also explicitly-
specified 'a' .. 'z' prefixes are mapped as shorthand.
Some significant (and ongoing) namespace support changes.
* XmlBinaryDictionaryWriterTest.cs: added test for shorthand
prefixed attributes.
svn path=/trunk/mcs/; revision=130381
* XmlBinaryFormat.cs, XmlBinaryDictionaryWriter.cs :
added some incomplete code for QName support.
* XmlBinaryDictionaryWriterTest.cs: added QName test part, but
disable since it does not work yet.
svn path=/trunk/mcs/; revision=130290
* XmlBinaryDictionaryReader.cs, XmlBinaryFormat.cs :
handle utf16 typed nodes. (not sure if it is used in writer.)
svn path=/trunk/mcs/; revision=130281
* XmlBinaryDictionaryReader.cs, XmlBinaryDictionaryWriter.cs,
XmlBinaryFormat.cs : fixed couple of issues regarding text and
base64 fixed-length buffers (their sizes are not variant).
Some ongoing changes on reading dummy-prefixed attributes.
svn path=/trunk/mcs/; revision=130278
2009-03-02 Chris Toshok <[email protected]>
* XmlBinaryDictionaryReader.cs, XmlSimpleDictionaryReader.cs: 2.1
has HasValue.
In System.XML/System.Xml:
2009-03-02 Chris Toshok <[email protected]>
* XmlReader.cs, XmlTextReader.cs, XmlTextReader2.cs,
EntityResolvingXmlReader.cs: 2.1 has HasValue.
In System.XML/Mono.Xml:
2009-03-02 Chris Toshok <[email protected]>
* SubtreeXmlReader.cs, XmlFilterReader.cs: 2.1 has HasValue.
In System.Xml.Linq/System.Xml.Linq:
2009-03-02 Chris Toshok <[email protected]>
* XNodeReader.cs: 2.1 has HasValue.
In System.ServiceModel.Web/System.Runtime.Serialization.Json:
2009-03-02 Chris Toshok <[email protected]>
* JsonReader.cs: 2.1 has HasValue.
svn path=/trunk/mcs/; revision=128406
NotImplementedExceptions. Revert the 2009-02-12 UniqueId.IsGuid
"fix", as .NET says that new UniqueId(new Guid()).IsGuid==false
(which makes no sense, as .ToString() on the same instance includes
the "urn:uuid:" prefix, which is used by Guids...).
* Test/System.Xml/UniqueIdTest.cs: Add tests for all members.
svn path=/trunk/mcs/; revision=126911