g_locale_from_utf8 and minus sign



When my app displays numerical output, I've been using a "real"
minus sign (U+2212) if the current font supports this (as checked
by pango), since it looks better than the usual hyphen-as-minus.

The minus sign displays correctly within GTK, but I've noticed
that if the app is running on, e.g. an ISO-8859-1 platform, so
that output has to be recoded for saving to disk or copying to the
clipboard, g_locale_from_utf8 chokes on the minus sign, giving

"Invalid byte sequence in conversion input"

I'm not sure if this is exactly a bug, but shouldn't U+2212 get
successfully mapped onto character 45 (0x002D) in ISO-8859-1?

-- 
Allin Cottrell
Department of Economics
Wake Forest University



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