Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Randall Sawyer
On 03/17/2016 10:39 AM, Randall Sawyer wrote: On 03/17/2016 09:30 AM, Matthias Clasen wrote: I believe that you haven't found such a proposal because most people don't see much use in a separate boxed type for utf8 strings. Every string we pass around in GLib and GTK+, and every char * in

Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Chris Vine
On Fri, 18 Mar 2016 10:19:08 -0400 Randall Sawyer wrote: > Also - I just discovered that glibmm has a class Glib::ustring > (https://developer.gnome.org/glibmm/stable/classGlib_1_1ustring.html). > I am going to take a look through its source to see what they have >

Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Randall Sawyer
On 03/17/2016 02:26 PM, Jasper St. Pierre wrote: I'll also ask what "character" means in this case, even though I know glib also has the same confusion. Are you talking about the number of Unicode code points in the string, or the number of grapheme clusters, as defined by Unicode TR29 [0]? The

Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Randall Sawyer
On 03/17/2016 07:23 PM, Matthias Clasen wrote: Sure, code point works too. Anyway, enough with the ontology, we're not a standards body I still don't think that we need a utf8-string datatype. I have questions, then. Here are excerpts from the current master files: "gstring.h" ... struct

Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Randall Sawyer
On 03/18/2016 10:10 AM, Florian Müllner wrote: On Fri, Mar 18, 2016 at 2:57 PM Randall Sawyer > wrote: how about the following modifications? Change "gstring.h": ... struct _GString { gchar *str;