[JAVA-1793] JsonReader incorrectly parses strings containing Unicode surrogate pairs Created: 04/May/15 Updated: 05/May/15 Resolved: 04/May/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | JSON |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | 3.0.1, 3.1.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
First reported on mongodb-users. JsonReader reads the full surrogate pair using String.codePointAt, but then always moves the position by one character. |
| Comments |
| Comment by Jeffrey Yemin [ 05/May/15 ] |
|
Closed for 3.0.1 release. |
| Comment by Githook User [ 04/May/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Since JsonBuffer is reading character-by-character anyway, there is no need to use String.codePointAt. And doing so is incorrect |
| Comment by Githook User [ 04/May/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Since JsonBuffer is reading character-by-character anyway, there is no need to use String.codePointAt. And doing so is incorrect |
| Comment by William Delanoue [ 04/May/15 ] |
|
Hi, I correct it with a simple : package org.bson.json; class JsonBuffer { (don't know if unread must be corrected to, I think so) |