yaf-splash does no unicode (but...)

Please post any bugs you have found
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

yaf-splash does no unicode (but...)

#1 Post by MU »

the title says it.
If I load unicode from a file and display it with yaf-splash, I see garbage.

My workaround in Muppy008.1 is a replacement for yaf-splash.

It seems to cover all calls I could find in /usr/sbin/

Code: Select all

#!/bin/bash

XMESSAGE="gxmessage -encoding UTF-8"

text=`echo $@ | sed -e "s/.*-text \(.*\)/\1/"`
#echo "$text"

a=`echo $@ | sed -e "s/-bg pale /-bg /" -e "s/-placement [^ ]* //" -e "s/-outline [^ ]* //" -e "s/-margin [^ ]* //" -e "s/-text .*//"`

#echo $a

exec $XMESSAGE -center -buttons "" -borderless $a "$text"


gxmessage does not know all options like "-margin", so those are filtered out.
It also does not know "pale green", so such "pale " is removed.
It also cannot position the window at bottom, so it is always centered.

I think we should no longer use apps that cannot deal with unicode, though yaf-splash is quite nifty.
Could we rewrite it with freebasic?
That creates so small executables! :)

Mark

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

I updated the code, I inserted "exec".
Without this, the messages could not be closed by PetGet :(
Mark

Post Reply