Date: Fri, 11 Apr 2003 17:26:41 +0200 To: Remi Vanicat Cc: lablgtk at kaba.or.jp Subject: Re: Problems using the new view widget Message-ID: <20030411152641.GA2621 at iliana> References: <20030411152228.3a45a003.maxence.guesdon at inria.fr> <20030411154505.0a899eac.maxence.guesdon at inria.fr> <20030411161409.047b3143.maxence.guesdon at inria.fr> <87of3dqcpb.dlv at wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87of3dqcpb.dlv at wanadoo.fr> From: Sven Luther On Fri, Apr 11, 2003 at 05:24:32PM +0200, Remi Vanicat wrote: > Maxence Guesdon writes: > > >> > Am I missing something ? > >> > In the example/text/text-demo.ml, my 'é' gives the same error when I add it > >> > to a string inserted in the buffer. > >> > > >> > How can I display this kind of character ? It worked before :-( > >> > >> Ok, Thanks to Olivier Andrieu I read the README file :-) > > > > I tried to to as the README says, and used the function > > Glib.Convert.locale_to_utf8 "ma lettre accentuée é" > > > > now I have another exception: > > exception Glib.GError("Invalid byte sequence in conversion input") > > > > I had to change my LC_ALL to fr_FR to make it work. > > Hope it will help someone in the future. > > well, you could have use > Glib.Convert.convert "ma lettre accentuée é" ~to_codeset: "utf-8" > ~from_codeset: "ISO-8859-1" > > but in that case, you don't look to locale... > > by the way, it best to leave LC_ALL untouched and to use LANG. BTW, would it not be better to have lablgtk2 call Glib.Convert.locale_to_utf8 by default each time it is necessary ? As ocaml don't use utf8 strings, but gtk+ apparently does. Friendly, Sven Luther