GNOME Bugzilla – Bug 530532
Support non-ASCII characters
Last modified: 2008-07-17 08:32:09 UTC
Gcalctool does not properly support unicode characters. The problems are: - GTK+ uses locale dependant strings so users can enter any unicode character (normally UTF-8) - The thousands separators and radix can be non-ASCII - The internal representation is ASCII (the code assumes string[3] will be the third character which is not correct if the input is UTF-8) - The flex parser is 8 bit only and freaks out when it sees UTF-8 characters. It doesn't appear the standard upstream version of flex can support 32bit strings. The proposal is: - Use an internal unicode (32 bit strings) representation - Convert GTK+ input to unicode - Convert equation to ASCII before sending to the parser. Obvious substitutions such as ×->*, ÷->/ need to be made before parsing. - Consider doing localization at the latest possible point, i.e. before sending to the GUI for display. The factors making this difficult currently: - Lots of code modified v->expression in various ways - Lots of code calls ui_set_display
First patch to improve structure: http://svn.gnome.org/viewvc/gcalctool?view=revision&revision=2086
All display code now in display.[ch]: http://svn.gnome.org/viewvc/gcalctool?view=revision&revision=2094
Realised this is a duplicate of bug #347630 *** This bug has been marked as a duplicate of 347630 ***