You are not logged in.

#1 2005-12-30 20:23:28

major
Member
From: Ockelbo, Sweden
Registered: 2005-12-30
Posts: 25

gtkdialog

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?

arch-pkg: http://www.ds.hj.se/~major/gtkdialog-1-1.pkg.tar.gz

Offline

#2 2005-12-30 20:35:44

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: gtkdialog

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.

Offline

#3 2005-12-30 20:46:28

major
Member
From: Ockelbo, Sweden
Registered: 2005-12-30
Posts: 25

Re: gtkdialog

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...

Offline

#4 2005-12-30 20:55:02

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: gtkdialog

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

Offline

#5 2005-12-30 21:02:33

major
Member
From: Ockelbo, Sweden
Registered: 2005-12-30
Posts: 25

Re: gtkdialog

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:

Offline

#6 2005-12-30 22:37:03

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: gtkdialog

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

Offline

#7 2005-12-31 00:17:35

major
Member
From: Ockelbo, Sweden
Registered: 2005-12-30
Posts: 25

Re: gtkdialog

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 smile

Offline

#8 2005-12-31 20:40:47

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: gtkdialog

learn python instead for wasting your time with dirty hacks like this. i promise you that you won't regret it. smile


arch + gentoo + initng + python = enlisy

Offline

Board footer

Powered by FluxBB