UTF-8 to local with #uXXXX escapes
- From: Ralf Stephan <ralf ark in-berlin de>
- To: gtkmm-list gnome org
- Subject: UTF-8 to local with #uXXXX escapes
- Date: Mon, 20 Nov 2006 09:56:35 +0100
Hello,
I can convert UTF-8 to local using a question mark for unknown
characters with a function like this:
std::string conv (const std::string& str)
{
const std::string& to = "";
const std::string& from = "UTF-8";
const Glib::ustring& fallback = "?";
return Glib::convert_with_fallback (str, to, from, fallback);
}
Now, I would like output like #u01a8 for Unicode characters.
How could one accomplish this? Wouldn't there be need for such
a conversion function?
ralf
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]