Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-13532

MapReduce functions: four-byte characters are replaced by U+FFFD

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0
    • 2.2.0
    • view-engine
    • 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:

      1. Add a document containing an emoji. Sample: { "id": 1, "name": "test 😊" }
      2. Add a map-reduce method, that returns that one. Sample: function (doc, meta) { emit(doc.id, doc.name); }
      3. 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vmx Volker Mische
            SimonSimCity SimonSimCity
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty