-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 5/27/2014 12:59 PM, Chris Vine wrote:
> If you want to treat input text as text, but don't know the
> encoding, you are stuffed, so just catch the conversion exception
> and abort, or try to deduce the codeset for yourself and abort when
> you fail.  If you want to treat it as binary data, treat it as
> binary data and all will be well.

Rather than abort, it would be preferable to ignore the bad characters
and keep reading.  Either that or replace them with the unknown
character.  It doesn't look like IOChannel provides a way to recover
from this exception though, other than closing the IOChannel and
giving up.

> I don't agree on that, as you know.  I prefer the programmer to be 
> given a choice (assuming that is what glibmm is doing here)
> according to the appropriate log level fatality preference.  Call

The choice the programmer has is to catch the exception.  By not
catching it, it looks like glibmm does, and shuts down the IOChannel,
causing the program to hang since it is expecting to get OnReadable
events that never come.  At the very least it should generate an eof
event or something other than just halting in the middle of a read
operation.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJThMjhAAoJEI5FoCIzSKrwj/gH/0R4zJ6Xd3NRsIWHzCIW9tB8
Gdd8FLmp0TF9aoGzZV8JMQ8KeQgUt5OYxFblYeQXwElMb0AiWmNhNsPjZIu9pdzf
h+O3vn4LAMt6eNT6wRtpMH3JlYiMpgQ9g8E3kvSUuWrM6//Ffg9h0wRVXhCrMCx5
BLhWkJm2rbPgB49rdzDhvNs9s7i+RJryFbVGtFeXA061GQMvP8n6YkwUvFGAGL/V
NQl1JaGsDlLZ4oPYZjKoPH8LuIh0jQt5/KnwKTqp9nWVFV8Y3c6Qsevz8ermSJye
nzvAcOG5WudrQ0JmFgQLBkdd3OjMzyE5P38c4/+5wC6NsqvoZSg9CBC70GJo+IE=
=6iNL
-----END PGP SIGNATURE-----
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to