9 Dec
2003
9 Dec
'03
7:13 a.m.
So... it's often good to do 'sanitizing' of input. In this case, where it's direct user input, speed should not even be a problem.
OK, what about:
u = g_utf8_get_char (utf8); if (u == (gunichar) -1) { g_warning ("Bad UTF-8 character"); return pos; } if (!g_unichar_isprint (u)) { g_warning ("Non-printable character"); return pos; }
is this enough sanitizing? :)
_________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963