g_utf16_to_utf8



Hi,

I have 2 main questions.
1- Don't have an equivalent method of g_utf16_to_utf8 on gtkmm?

2- Has memory leak on method below?
The generated string from g_utf16_to_utf8 must be freed manually, even when stored in a ustring?

Glib::ustring win_NetworkInterface::get_name()
{
    Glib::ustring name(g_utf16_to_utf8((gunichar2*) this->ifinfo.FriendlyName,
            -1, NULL, NULL, NULL));
    return name;
}

Thank you.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]