Ok, i'm trying to write a simple program/script with bash and a GUI written in gtkdialog http://linux.pte.hu/~pipas/gtkdialog/
However, sence i am swedish i want to use åäö. But then it says:
(gtkdialog:10500): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
I have tried changing the $LANG variable to en_US.utf8 and sv_SE.utf8 without any luck. anyone knows how to fix this problem?
hmmm, make sure everything is utf8 encoded, including the bash file itself - use iconv if needed.
I'd suspect that "some string åäö" in the bash file isn't being recognized as a utf8 string... in fact, you may want to even pipe the whole gtkdialog string through iconv before using it in the app.
Ok, the string "åäö" now works. used vim's :set encoding=utf-8
Now i have another problem tough.. how can it be shown as "åäö" and not as : "Ã¥Ã¤Ã¶"
Also, i have to press "å" 3times, "ä" 3 times and "ö" 4times. its quite annoying...
hmm, that looks like an encoding clash somewhere - utf8 characters usually display as 2 characters if it's displaying in a non-utf8 form... try running the gtkdialog command as
LANG=sv_SE.utf8 gtkdialog --options
I found the problem..
I tried starting xterm with -en UTF8, but it didnt work. then i just remembered i didnt reload the config :oops:
you should take a look at pygtk major. i think that is almost as easy as this and more integrated in the language.
arch + gentoo + initng + python = enlisy
pygtk is gtk for python, right?
and, for python qt is better. if one use qt-designer (a visual c++ look a like) and then use the pyqt-thingies...
i know only a little python and bash is fine for this simple little program/script