
10 Dec
2003
10 Dec
'03
3:27 a.m.
On Tue, 2003-12-09 at 02:13, bulia byak wrote:
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? :)
Looks adequately paranoid ^_^
-mental