]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
lib/ucs2_string: Add ucs2 -> utf8 helper functions
authorPeter Jones <pjones@redhat.com>
Mon, 8 Feb 2016 19:48:11 +0000 (14:48 -0500)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:22:19 +0000 (10:22 +0100)
commit6d9b074936bc0af9a2771feef70bcdfc7e62a7b0
treebad072107c7fc2bc92c6bd8e72e5e499fb360741
parentba0ac98c07f1cb4ce4ecddd8baba5cbbf93854ea
lib/ucs2_string: Add ucs2 -> utf8 helper functions

BugLink: http://bugs.launchpad.net/bugs/1553179
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
include/linux/ucs2_string.h
lib/ucs2_string.c