Alternative interface proposal (was: Re: UTF-8 Functions)
- From: Omer Zak <omerz actcom co il>
- To: gtk-devel-list gnome org
- Cc: gtk-i18n-list gnome org
- Subject: Alternative interface proposal (was: Re: UTF-8 Functions)
- Date: Fri, 20 Jul 2001 21:13:23 +0300 (IDT)
My proposal is as follows:
In the functions, which convert from one string into another string,
support the metaphor of piecemeal processing of strings.
You can find, in fribidi-0.9.0/fribidi_char_sets_utf8.[hc],
procedures, which support piecemeal conversion of strings between Unicode
(UCS-4) and UTF-8 formats. Those procedures maintain counters of consumed
portions and actually-produced portions, and support processing of very
long strings when the amount of available memory is limited.
This is important for embedded devices, like cellular phones. While such
devices have no use for the whole GTK or GLIB, portable software would
typically use the same interface, but implement a subset of the library.
(By the way, this is actually used in the Nokia 9110 Communicator Hebrew
Support.)
On 1 Jul 2001, Owen Taylor wrote:
>
> I've now added the following functions to GLib. I'm pretty happy with
> them as encapsulating the basic operations of this nature in a simple
> manner.
>
> The main change I'm considering at this point is to add a max_len (can
> be -1) parameter to normalize(), casefold(), strup(), strdown(), and
> collate_key(). It makes things just a little bit more complicated, but
> I hate having to g_strndup() a portion of a string, do something, and
> then free the dup'ed string immediately.
>
> (If you look inside the implementations, you'll see that this is
> a convenience concern, not an efficiency concern at this point!)
>
> But if people have other easy-to-implement improvements, I'd be
> happy to consider them as well.
>
> Regards,
> Owen
[... proposed function declarations and documentation - snipped ...]
--- Omer
WARNING TO SPAMMERS: see at http://www.zak.co.il/spamwarning.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]