Trouble with accented characters
| From: | André Jansen | Date: | Sun, 20 Nov 2005 14:52:15 +0000 |
| Subject: | Trouble with accented characters | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-6352@lists.php.net to get a copy of this message | ||
Hi all,
As I was trying out an entry completion scheme where text typed into a
GtkEntry is automatically added to a GtkEntryCompletion list, something
weird happened. I typed my name - which happens to contain an eacute,
tabbed out of the entry (activating the callback which was to add the
entry text to the completion list) and PHP promptly crashed:
GLib-CRITICAL **: g_utf8_casefold: assertion `str != NULL' failed
Entries not containing accented characters did not trigger a crash.
I tried changing the 'php-gtk.codepage' setting in php.ini, but with the
most likely correct settings CP1252 or ISO-8859-1 the problem persists.
For replicating the problem - using the win32 binary distribution from
http://ftp.emini.dk/pub/php/win32/gtk2/ - try
the following:
1) load entrycompletion.php (part of the demo) in your favourite editor
2) in function __create_completion_model(), modify one of the strings so
it contains an accented character.
3) save, and then run phpgtk2-demo.php.
4) select the entrycompletion demo
5) type any character in the edit box
6) Crash!
7) Dismiss the Application Error dialog box... :-/
Comments?
Cheers,
--
André
===========================================================
This tagline contains no Polychlorinated Biphenyls.