MB-12967: Fix Unicode conversion

This change partly reverts commmit
ca31670ffdb51a6bcac7f44ed955ba7687ec9b07 [1].

The supplied length for the conversion was off by one.

[1]: https://github.com/couchbase/couchstore/commit/ca31670ffdb51a6bcac7f44ed955ba7687ec9b07

Change-Id: I85b45be6bf5f4bac3c90620b9fa9d4b62094579e
Reviewed-on: http://review.couchbase.org/44471
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>