gtkutil::IConv Class Reference
#include <IConv.h>
Detailed Description
greebo: This is a wrapper class around the iconv functions. Many codeparts have been taken from the GLib::IConv class in the glibmm 2.14.2 library.
Definition at line 19 of file IConv.h.
Constructor & Destructor Documentation
Open new conversion descriptor.
- Parameters:
-
| to_codeset | Destination codeset. |
| from_codeset | Source codeset. |
Definition at line 29 of file IConv.h.
References gobject_.
gtkutil::IConv::~IConv |
( |
|
) |
[inline] |
Close conversion descriptor.
Definition at line 47 of file IConv.h.
References gobject_.
Member Function Documentation
Convert from one encoding to another.
- Parameters:
-
| str | The string to convert. |
- Returns:
- The converted string.
- Exceptions:
-
Definition at line 90 of file IConv.h.
References gobject_, and string.
greebo: Converts the given filename to UTF-8. Returns an empty string if the conversion fails.
Definition at line 159 of file IConv.h.
References string.
GIConv gtkutil::IConv::gobj |
( |
|
) |
[inline] |
size_t gtkutil::IConv::iconv |
( |
char ** |
inbuf, |
|
|
gsize * |
inbytes_left, |
|
|
char ** |
outbuf, |
|
|
gsize * |
outbytes_left | |
|
) |
| | [inline] |
Same as the standard UNIX routine iconv(), but may be implemented via libiconv on UNIX flavors that lack a native implementation. glibmm provides Glib::convert() and Glib::locale_to_utf8() which are likely more convenient than the raw iconv wrappers.
- Parameters:
-
| inbuf | Bytes to convert. |
| inbytes_left | In/out parameter, bytes remaining to convert in inbuf. |
| outbuf | Converted output bytes. |
| outbytes_left | In/out parameter, bytes available to fill in outbuf. |
- Returns:
- Count of non-reversible conversions, or
static_cast<size_t>(-1)
on error.
Definition at line 62 of file IConv.h.
References gobject_.
greebo: Converts the given string from UTF-8 to the current locale. Returns an empty string if the conversion fails.
Definition at line 138 of file IConv.h.
References string.
greebo: Converts the given string to UTF-8 encoding. Returns an empty string if the conversion fails.
Definition at line 117 of file IConv.h.
References string.
void gtkutil::IConv::reset |
( |
|
) |
[inline] |
Reset conversion descriptor to initial state. Same as iconv(0, 0, 0, 0)
, but implemented slightly differently in order to work on Sun Solaris <= 7. It's also more obvious so you're encouraged to use it.
Definition at line 72 of file IConv.h.
References gobject_.
Field Documentation
The documentation for this class was generated from the following file:
- src/tools/radiant/libs/gtkutil/IConv.h