Hi Dan,

I need to add encoding support to FFI so that we can easily call 
functions which expect UTF8 or UTF16. For this I need two main pieces of 
functionality:

- I need to check for null characters in strings and throw an error, 
because otherwise we're susceptible to certain security attacks. I could 
do this first but could it be incorporated into the string 
encoding/decoding loop? If a null character was seen, some kind of flag 
could be returned. Most code would ignore it but FFI would throw an error.

- I need a utf16n encoding which delegates to either utf16le or utf16be 
depending on the endianness of the current machine (use the 
little-endian? word in alien.c-types to find out which is which).

Once this is done I can eliminate the old archaic C primitives for 
encoding and decoding latin1 and ucs2 strings.

Slava

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to