|
From: | Richard Frith-Macdonald |
Subject: | Re: GSFromUnicode/GSToUnicode buffers [Was: [bug #4208]Applications won't start] |
Date: | Tue, 8 Jul 2003 11:05:58 +0100 |
On Tuesday, July 8, 2003, at 03:31 AM, Alexander Malmberg wrote:
When looking at this bug, I noticed in the GSFromUnicode and GSToUnicodedocumentation: (input to GSToUnicode) "" * <p>The slen argument is the length (bytes) of the 8-bit character string * which is to be converted to 16-bit unicode. * This is measured in characters, not bytes. "" and (output from GSFromUnicode) "" * <p>The size argument is a pointer to the initial size of the destination * buffer. If the function changes the buffer size, this value will be * altered to the new size. This is measured in characters, not bytes. "" which makes no sense to me. It seems that both of these should be in bytes.
I think that what was meant was that these counts are supposed to be in bytes for non-unicode date, and unichars for unicode data as appropriate ...
ie. lengths of ucs2 strings should be the number of 16-bit unichars in the strings, but lengths of strings in other encodings should be the number of 8-bit bytes in the strings (which is the same
thing as the number of characters for most encodings). I haven't checked what the code actually does though.
[Prev in Thread] | Current Thread | [Next in Thread] |