lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thank you both for your answers, I think I'll find my way with iconv. I
don't think it will be that straightforward since I want to read
character by character. So I'll need to read my stream chunk by chunk,
and then put that in a buffer and read the buffer character by
character. But that's not that difficult I have to admit. Just
something boring i'll have to do :)

Le Sun 08/06/2008 à 13:25 Alexandre Erwin Ittner à écrit:
> As noted above, Unicode character splitting is a pretty complex
> subject. Since you can not use fp:read(some_number_of_bytes) (it may
> get invalid codepoints and yield iconv.ERROR_INCOMPLETE) there is no
> easy way to limit your input to a secure length. I have not used
> slnunicode yet, but I think it have some functions for these
> operations.

I understand that. I imagine that it's not really possible to split
between fo example an accent and the letter that should receive the
accent.

But, my code will just recognize some characters (like /, \, {, } and
others). I don't think there will be problems if I only split at those
boundaries only.

Thanks

Mildred

-- 
Mildred Ki'lya
E-Mail:	mildred593(at)online.fr

Site:	<http://mildred632.free.fr/>
XMPP:	<mildred@jabber.fr> (GoogleTalk, Jabber)

GPG:	197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]