Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.2.0
-
Security Level: Public
-
None
-
Confirmed with:
* Mac OS X 10.10 using Couchbase 2.2.0 Community Edition
* Ubuntu 14.10 using Couchbase 2.2.0 Community Edition
-
Untriaged
-
Unknown
Description
I have some documents, containing properties, whose value contains four-byte UTF8 characters. Those are mostly emojis.
Lately, I found out, that those characters are not correctly handled if I add them to the result of a map-reduce method. If I use it inside a map-reduce function, all those characters are returned as U+FFFD, called REPLACEMENT CHARACTER.
Steps to reproduce:
- Add a document containing an emoji. Sample: { "id": 1, "name": "test 😊" }
- Add a map-reduce method, that returns that one. Sample: function (doc, meta) { emit(doc.id, doc.name); }
- Call that map-reduce method and take a look at the result
A workaround, I use currently, is to fetch the document by the key-value-interface. That one returns the emojis correctly.