Tuesday, October 30, 2007
Handling Invalid UTF-8 in ZeroBUGS
Based on suggestions from users I have changed the way ZeroBUGS deals with invalid UTF8 code when loading source files. The GtkSourceView widget uses ustrings internally, and when passed single-byte strings will assume UTF-8 encoding and convert them.
In order to prevent accidents such as loading a binary file instead of a source file by the users, I had my UI reject outright any invalid UTF-8 text.
But it turns that sometimes this restriction is too strong, and I have added a dialog that asks before rejecting the file.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment