xosd and encoding

B

B.

Hello everybody,

I started playing with xosd but I encountered some problems with some
characters :

----

require "xosd"

$KCODE="UTF8"

osd = Xosd.new(2)
osd.font = "-*-*-*-*-*-*-30-*-*-*-*-*-*-*"
osd.color = "blue"
osd.align = "right"
osd.valign = "bottom"
osd.timeout = 3

osd.puts "Début" # "begin" in French

-----

If I run this script through irb (1.8), everything works properly.
If I run this script through ruby (1.8), the OSD displays every character
until it meets the first odd character then stops.

I am a very beginner in ruby, so does anyone have any idea ?

(I found the "$KCODE="UTF8"" on the Internet but without it, the results are
the same...)

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,662
Latest member
sxarexu

Latest Threads

Top