lib/ucs2_string: Add ucs2 -> utf8 helper functions

[ Upstream commit 73500267c9 ]

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: Sasha Levin <sasha.levin@oracle.com>
This commit is contained in:
Peter Jones 2016-02-08 14:48:11 -05:00 • committed by Sasha Levin
commit dc1351fcd8
2 changed files with 66 additions and 0 deletions