Re: Fw: view cant' show special characters (at least not with gtk_text_buffer_set_text() so far)
- From: Sven Neumann <sven gimp org>
- To: "calmar" <mac calmar ws>
- Cc: <gtk-list gnome org>
- Subject: Re: Fw: view cant' show special characters (at least not with gtk_text_buffer_set_text() so far)
- Date: 15 May 2002 18:17:26 +0200
Hi,
"calmar" <mac calmar ws> writes:
> >the text put into a GtkTextView (or any other GTK+-2.0 widget)
> >absolutely needs to be UTF-8 encoded. Glib provides a number of
> >functions that help you to convert from and to other encodings.
>
> i tried something like this:
> //code begin
>
> char ** end;
>
> if ( ! (g_utf8_validate ( pointer_string_to_validate, -1 , (const char **)
> end) ) )
> {
> **end= (const char) "." ;
> }
this should work (untested):
gchar *end;
if (! g_utf8_validate (pointer_string_to_validate, -1 , &end))
{
*end = '.';
}
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]