Re: G_UTF8String: Boxed Type Proposal



[ Replying a little randomly to this message. ]

Randall Sawyer:
3) Wouldn't it be helpful to keep track of how many code points
("characters")are stored in the GString - a number which may be less than
the value of GString.len - without needing to call g_utf8_strlen() each time
to find out?

IMnsHO, NO, definitely not.

To the people who want this feature: why do you want it? The octet length is
necessary to copy the string, store it in a file, send it to network.

But what use is the number of Unicode code points? Or their index in the
string? 

In my experience, the almost-only relevant treatment to an Unicode string is
to walk over, character by character, applying parsing or typographic
algorithms. Knowing how many code points, or even graphemes, were in a given
span or the whole string is almost always irrelevant.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature



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