Subject: Re: CVS commit: src/sys/dev/usb
To: None <tech-kern@NetBSD.org>
From: Dieter Baron <dillo@danbala.tuwien.ac.at>
List: tech-kern
Date: 02/26/2007 15:08:44
In article <20070226134440.DC9502150A@cvs.netbsd.org> Matthias wrote:
: Module Name: src
: Committed By: drochner
: Date: Mon Feb 26 13:44:40 UTC 2007
: Modified Files:
: src/sys/dev/usb: usbdi.c
: Log Message:
[...]
: -use <fs/unicode.h> for utf16->utf8 conversion instead of a private
: implementation
[...]
Please note that fs/unicode.h does not handle UTF-16 surrogates
correctly. What's worth, the API does not allow this to be fixed.
(Unicode defines more characters than fit in a 16 bit int. In
UTF-16, a character with a code above 0xffff is represented as two
surrogate values. In UTF-8, it is encoded as a 5 byte sequence.
Encoding/decoding one 16 bit value at a time does not allow for this
conversion to be done correctly.)
yours,
dillo