![]() |
![]() |
![]() |
GIO Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <gio/gio.h> GUtf8InputStream; GInputStream * g_utf8_input_stream_new (GInputStream *base_stream);
utf8 input stream implements GFilterInputStream and provides UTF8 validation of the data read from a the stream. If the supplied buffer is long enough (see below), the returned data is guaranteed to end at utf8 character boundaries.
Extra care must be taken when performing "small" reads: unless you have control of the data being read, you need to always supply a buffer long at least 6 bytes, otherwise the returned content may be an incomplete utf8 byte sequence.
To create an utf8 input stream, use g_utf8_input_stream_new()
.
typedef struct _GUtf8InputStream GUtf8InputStream;
An implementation of GFilterInputStream that performs UTF8 validation.
Since 2.24
GInputStream * g_utf8_input_stream_new (GInputStream *base_stream);
Creates a new GUtf8InputStream from the given base_stream
.
|
a GInputStream. |
Returns : |
a GInputStream for the given base_stream .
|
Since 2.24