On 06 Nov 2013, at 13:59, Sven Van Caekenberghe <[email protected]> wrote:

> 
> On 06 Nov 2013, at 13:29, Henrik Johansen <[email protected]> 
> wrote:
> 
>> On 06 Nov 2013, at 10:38 , Sven Van Caekenberghe <[email protected]> wrote:
>> 
>>> BTW, do we still need UTF16 support ?
>>> 
>>> For those encodings that we still want to support in the future, we should 
>>> have new and more principled implementations under ZnCharacterEncoder. That 
>>> is, if we ever want to fase out TextConverter.
>> 
>> UTF16 is the encoding for string arguments to the Unicode-aware version of 
>> the Windows API's, so I’d say yes.
>> Not too sure about JNI, but I know Java also uses UTF16 internally.
>> 
>> So the short answer is yes.
>> Not as a storage encoding, but for calling foreign functions, it’s quite 
>> important.
> 
> Ah, OK.
> 
> Fancy giving it a try, to create a ‘new’ implementation under 
> ZnCharacterEncoder with some tests ?
> 
> There are only 3 abstract methods to implement, if you should already know 
> UTF16, it would not be too much work ;-)

A first attempt:

===
Name: Zinc-Character-Encoding-Core-SvenVanCaekenberghe.27
Author: SvenVanCaekenberghe
Time: 8 November 2013, 4:18:07.642898 pm
UUID: 29824770-7b9d-4377-a934-7bb2fbeefefb
Ancestors: Zinc-Character-Encoding-Core-SvenVanCaekenberghe.26

Added new ZnUTF16Encoder
Minor refactoring to ZnCharacterEncoder hierarchy
===
Name: Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.14
Author: SvenVanCaekenberghe
Time: 8 November 2013, 4:18:53.717919 pm
UUID: 6309f553-1632-438d-825c-b7a0f89193f4
Ancestors: Zinc-Character-Encoding-Tests-SvenVanCaekenberghe.13

Added unit tests for the new ZnUTF16Encoder
===

>> Cheers,
>> Henry


Reply via email to