[CSHARP-694] Provide some way for the C# driver to be more lenient about UTF8 validity Created: 01/Mar/13 Updated: 03/Jul/14 Resolved: 19/Mar/13 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.7.1 |
| Fix Version/s: | 1.8 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
The C# driver sets .NET's throwOnInvalidBytes argument to true when constructing a UTF8Encoding object. This results in exceptions being thrown when attempting to decode invalid UTF8 returned from the server. This is generally a good thing, so this should remain the default, but there are cases where other drivers (or mongoimport) create and store UTF8 that is not 100% UTF8 compliant and it would be useful to have a setting that tells the C# driver to be more tolerant of invalid UTF8 returned from the server. Note that round tripping a document that contains invalid UTF8 would then result in the document changing slightly, since the invalid UTF8 characters would be replaced by the Unicode character sequence for an invalid code point (\uFFFD\uFFFD). The new document would only differ where invalid code points were present, and the new document would now be 100% UTF8 compliant. |
| Comments |
| Comment by auto [ 19/Mar/13 ] |
|
Author: {u'date': u'2013-03-18T21:34:39Z', u'name': u'rstam', u'email': u'robert@10gen.com'}Message: |
| Comment by auto [ 19/Mar/13 ] |
|
Author: {u'date': u'2013-03-18T20:37:51Z', u'name': u'rstam', u'email': u'robert@10gen.com'}Message: |
| Comment by Robert Stam [ 18/Mar/13 ] |
|
ReadEncoding and WriteEncoding need to be added to MongoClientSettings also. |
| Comment by auto [ 05/Mar/13 ] |
|
Author: {u'date': u'2013-03-05T02:59:13Z', u'name': u'rstam', u'email': u'robert@10gen.com'}Message: |
| Comment by auto [ 04/Mar/13 ] |
|
Author: {u'date': u'2013-03-04T21:51:08Z', u'name': u'rstam', u'email': u'robert@10gen.com'}Message: |
| Comment by auto [ 04/Mar/13 ] |
|
Author: {u'date': u'2013-03-04T17:20:52Z', u'name': u'rstam', u'email': u'robert@10gen.com'}Message: |