let of_utf8 ?coding s =
match coding with
Some charset ->
Glib.Convert.convert
~from_codeset: "UTF-8" ~to_codeset: charset s
| None ->
try Glib.Convert.locale_from_utf8 s
with _ ->
Glib.Convert.convert
~from_codeset: "UTF-8" ~to_codeset: Ed_core_rc.encoding#get s