Jason Andryuk a68075908a lib/ucs2_string: Correct ucs2 -> utf8 conversion
The comparisons should be >= since 0x800 and 0x80 require an additional bit
to store.

For the 3 byte case, the existing shift would drop off 2 more bits than
intended.

For the 2 byte case, there should be 5 bits bits in byte 1, and 6 bits in
byte 2.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Matthew Garrett <mjg59@coreos.com>
Cc: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
2016-02-16 12:49:05 +00:00
..
2014-10-09 11:35:48 +03:00
2015-07-27 14:06:24 +02:00
2011-03-11 14:25:50 +00:00
2015-11-23 09:44:58 +01:00
2015-05-28 11:31:52 +09:30
2011-10-29 21:20:22 +02:00
2015-10-05 04:49:54 +01:00
2014-04-30 19:49:37 +01:00
2012-10-06 03:04:57 +09:00
2014-08-06 18:01:25 -07:00
2014-05-05 09:09:14 +02:00
2016-01-19 15:26:55 -05:00
2014-08-08 15:57:25 -07:00
2015-02-12 18:54:15 -08:00
2012-07-30 17:25:16 -07:00
2014-06-25 17:45:43 -07:00
2015-09-08 14:35:59 -07:00
2015-02-12 18:54:16 -08:00
2015-03-23 22:12:08 -04:00
2015-06-25 17:00:40 -07:00
2015-12-18 16:04:51 -05:00
2013-04-29 18:28:42 -07:00