lib/ucs2_string: Add ucs2 -> utf8 helper functions
authorPeter Jones <pjones@redhat.com>
Mon, 8 Feb 2016 19:48:11 +0000 (14:48 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2016 15:41:36 +0000 (08:41 -0700)
commitf0b5aae480e53e26c0739241144eaa0e2e56a4fc
treebef0ed1bbe5a91764545eb59b49ceab979491320
parent73c1d981f04cdee52466ea0e5fc0d04c76ad6f49
lib/ucs2_string: Add ucs2 -> utf8 helper functions

commit 73500267c930baadadb0d02284909731baf151f7 upstream.

This adds ucs2_utf8size(), which tells us how big our ucs2 string is in
bytes, and ucs2_as_utf8, which translates from ucs2 to utf8..

Signed-off-by: Peter Jones <pjones@redhat.com>
Tested-by: Lee, Chun-Yi <jlee@suse.com>
Acked-by: Matthew Garrett <mjg59@coreos.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/ucs2_string.h
lib/ucs2_string.c