From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30890 invoked by alias); 6 Jun 2003 22:23:00 -0000 Mailing-List: contact guile-gtk-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: guile-gtk-owner@sources.redhat.com Received: (qmail 30868 invoked from network); 6 Jun 2003 22:22:59 -0000 Received: from unknown (HELO snoopy.pacific.net.au) (61.8.0.36) by sources.redhat.com with SMTP; 6 Jun 2003 22:22:59 -0000 Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.3) with ESMTP id h56MMvKN019468 for ; Sat, 7 Jun 2003 08:22:58 +1000 Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h56MMvQg013697 for ; Sat, 7 Jun 2003 08:22:57 +1000 (EST) Received: from localhost (ppp51.dyn228.pacific.net.au [203.143.228.51]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h56MMtYZ015648 for ; Sat, 7 Jun 2003 08:22:56 +1000 (EST) Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19OPbi-00063U-00; Sat, 07 Jun 2003 08:22:46 +1000 To: guile-gtk@sources.redhat.com Subject: GdkWChar (was: Added a bunch of GDK routines.) References: From: Kevin Ryde Mail-Copies-To: never Date: Fri, 06 Jun 2003 22:23:00 -0000 Message-ID: <878yse3ky1.fsf@zip.com.au> User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-q2/txt/msg00133.txt.bz2 Marko Rauhamaa writes: > > - gdk-1.2.defs: Defined an alias GdkWChar for uint for > gdk_draw_text_wc. (I trust uint to correspond to guint32 because > currently there is no alternative.) Presumably one day guile will get its own notion of chars bigger than a byte. Probably no alternative to plain integers until then. I'm thinking the words below can cover the present situation at least. [General conventions:] Strings Gtk generally uses strings encoded in UTF-8. Guile (version 1.6) has no direct notion of multi-byte characters in strings, so applications will need to take care when in a non-ASCII or non-Latin locale. Converting to `GdkWChar' with `gdk-mbstowc' (*note Gdk Module::) is one way to identify character boundaries at least. [Gdk Module:] `GdkWChar' Currently `GdkWChar' values are represented as integers, and `GdkWChar' strings as vectors of integers. So for instance `gdk-mbstowc' returns such a vector (or `#f' if conversion fails). Note that this representation might change in the future if Guile gets its own notion of characters bigger than 8 bits.