In my school-inspired haste I misread the issue. You're right, it shouldn't work.
Unless, as you say, we were to convert single character arrays to gchar... which, you're right again,
is probably not something we want to do. Though this does potentially leave us with some C functions
which are simply completely inaccessible... (not these, which have JS equivalents, but others...)
But yeah, scratch what I said about the bug report.
Sorry...
--Tim
The equivilant in _javascript_:
String.fromCharCode(65); // returns 'A"
String.fromCharCode('a'); // returns empty string..
So I think the current behaviour is consistent with the expected behaviour in _javascript_.
Regards
Alan
--- On 09/Feb/2010, Tim Horton wrote:
While Alan is right in that _javascript_ should have most of what you need UTF-wise, that's no reason for us to get this wrong (those functions *should* be made to work, you weren't wrong to try to use them). I'll take a look at it when I get a chance (if I don't respond within a few days, file a bug so that I don't forget - or, you can do that anyway).
--Tim
On Feb 8, 2010, at 12:54, alsaf wrote:
Thanks Alan.
I'll definitely have a closer look at this as it looks most helpful. As
I mentioned, I am just having a look at the glib library and not sure if
these character based functions would be used in a real-life situation
as I had used them but it is worth knowing for curiosities sake.
----------------------------------------------------------------------
Message: 1
Date: Sun, 07 Feb 2010 22:16:42 +0800
From: "Alan Knowles" <alan akbkhome com>
To: "alsaf" <libseed-list-bounces gnome org>
Cc: libseed-list gnome org
Subject: Re: libseed-list Defining a gchar in seed?
Message-ID: <2f657cdefe2d82c9c28c5f0d8d7cb361-*LOGS akbkhome com>
Content-Type: text/plain; charset=ISO-8859-1
_javascript_ is UTF friendly - you should probably look at the native functions for this -
https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String
Regards
Alan
--- On 07/Feb/2010, alsaf wrote:
I've found a command to convert from utf-8 to char:
glib.utf8_get_char("a");
But unable to find one that does it the other way. I see there is a
command called glib.convert but that does string but is there one for
characters?
_______________________________________________
libseed-list mailing list
libseed-list gnome org
http://mail.gnome.org/mailman/listinfo/libseed-list
------------------------------
_______________________________________________
libseed-list mailing list
libseed-list gnome org
http://mail.gnome.org/mailman/listinfo/libseed-list
End of libseed-list Digest, Vol 5, Issue 3
******************************************
_______________________________________________
libseed-list mailing list
libseed-list gnome org
http://mail.gnome.org/mailman/listinfo/libseed-list
_______________________________________________
libseed-list mailing list
libseed-list gnome org
http://mail.gnome.org/mailman/listinfo/libseed-list
_______________________________________________
libseed-list mailing list
libseed-list gnome orghttp://mail.gnome.org/mailman/listinfo/libseed-list