From d0ff68da6a606602235fb8749473999e3d1bde53 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 7 Oct 2011 13:28:18 -0700 Subject: Fix regression in CursorWindow.copyStingToBuffer. Bug: 5332296 Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99 --- include/utils/Unicode.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/utils/Unicode.h') diff --git a/include/utils/Unicode.h b/include/utils/Unicode.h index 6afb291f4a52..92735337705d 100644 --- a/include/utils/Unicode.h +++ b/include/utils/Unicode.h @@ -149,6 +149,13 @@ void utf8_to_utf32(const char* src, size_t src_len, char32_t* dst); */ ssize_t utf8_to_utf16_length(const uint8_t* src, size_t srcLen); +/** + * Convert UTF-8 to UTF-16 including surrogate pairs. + * Returns a pointer to the end of the string (where a null terminator might go + * if you wanted to add one). + */ +char16_t* utf8_to_utf16_no_null_terminator(const uint8_t* src, size_t srcLen, char16_t* dst); + /** * Convert UTF-8 to UTF-16 including surrogate pairs. The destination buffer * must be large enough to hold the result as measured by utf8_to_utf16_length -- cgit v1.2.3-59-g8ed1b