String 'sanitizer' routine
31 Jan
2005
31 Jan
'05
8:21 a.m.
I just dumped a simple routine into io/sys.h to return a 'safe' version of any given string.
Inkscape::IO::sanitizeString
The most immediate need is for those places where we might be displaying an error for a potentially bad path (such as when we're unable to create a file or directory). It will return a copy of the string as-is if it's valid UTF-8, otherwise it will walk through and escape all non-ASCII bytes. That should at least stop Pango crashes from hiding true problems or from turning warnings into crashes, like bug 1107305.
Soo...... I'm hitting bed now, but anyone can feel free to try it out in a few critical places.
7265
Age (days ago)
7265
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jon A. Cruz