DESCRIPTION

JVMCBC-187: Properly encode keys with special chars.

Motivation
----------
Keys with special characters that require more than one byte to
represent it have a different byte length than string length in
java.

In order to properly store those characters, the code needs
to take the encoded byte length rather than the originating
string length.

Modifications
-------------
The code has been modified so that the actual key length is
computed from the UTF-8 encoded byte array, rather from its
original string representation.

A test has been added to verify this assertion.

Result
------
Correct encoding of keys which require more bytes on the
wire than their java string representation characters.

Change-Id: I44dc4ddbe4b6ce778f094156e1f4433ee49d26d5
Reviewed-on: http://review.couchbase.org/49942
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx
Reviewed-on: http://review.couchbase.org/49945


COMMENTS

author: Gerrit Code Review
date: 2015-04-21 07:51:17.483000000

Change has been successfully cherry-picked as ae79f24a24ba8e4ffe5af201f208fc58aeb4f9ee

-------------------------------------
