Howto handle Invalid UTF-8 string?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Howto handle Invalid UTF-8 string?

kyanh-2
Hi all,

>From my program (winefish), some child processes are called and
theirs output will be captured. The IO_channel was used for this
purpose.

The problem is that some children may procedure invalid UTF8 strings
(for example, when LANG=fr_FR and `cat' returns 1 (file not found)).
This causes empty output in gtk_tree_view!!  ( I tried to use NULL
encoding (for IO_channel) but failed )

Question: how to handle invalid UTF8 string?

Thank you for replies.

Regards,

kyanh

PS:
this topic is related to BUG#82 (see BUGS) of Winefish,
http://winefish.berlios.de/

_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Howto handle Invalid UTF-8 string?

Claudio Polegato Junior
[hidden email] escreveu:

> Hi all,
> >From my program (winefish), some child processes are called and
> theirs output will be captured. The IO_channel was used for this
> purpose.
> The problem is that some children may procedure invalid UTF8 strings
> (for example, when LANG=fr_FR and `cat' returns 1 (file not found)).
> This causes empty output in gtk_tree_view!!  ( I tried to use NULL
> encoding (for IO_channel) but failed )
>
> Question: how to handle invalid UTF8 string?
>  
Hi,

You can throw g_locale_conv* and by iconv command line.

--

[]'s

Claudio Polegato Junior

Um peregrino de Problemas; Um pergaminho de Soluções.

_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list