Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > A small internationalization issue?

Reply
Thread Tools

A small internationalization issue?

 
 
tuti plain
Guest
Posts: n/a
 
      01-03-2010
Hi all,

I am a Puerto Rican using Ruby, so the apps I develop are mostly in
Spanish. I am using FXRuby for GUI development (I want to learn wxRuby,
but I can't find any good tutorials out there). Sometimes, when I
create FXLabels, and have to use Spanish characters like: á é * ó ú,
they don't display properly on the window. I did a simple test and made
a script with one single line:

puts "á é * ó ú"

When I run this script, the output is:

ß Θ φ ≤ ·

Obviously not what I intended! Funny thing is, when I write that very
same line using irb, the characters display properly.

I think there might be some sort of internationalization issue, perhaps
not even in the language itself.

This is a problem because these characters are sometimes necessary for
words in Spanish, and not using them might mean grammatically incorrect
applications.

Can someone please clarify this for me? Thanks!
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Gregory Brown
Guest
Posts: n/a
 
      01-03-2010
On Sun, Jan 3, 2010 at 1:40 PM, tuti plain <(E-Mail Removed)> wrote:

> puts "=C3=A1 =C3=A9 =C3=AD =C3=B3 =C3=BA"
>
> When I run this script, the output is:
>
> =C3=9F =CE=98 =CF=86 =E2=89=A4 =C2=B7


> Can someone please clarify this for me? =C2=A0Thanks!


What version of Ruby are you running? What encoding are your files
saved in? We will need to know this in order to be able to help out.

If you're new to character encodings, in general or just in Ruby, this
series might help:
http://blog.grayproductions.net/cate...cter_encodings

-greg

 
Reply With Quote
 
 
 
 
tuti plain
Guest
Posts: n/a
 
      01-04-2010
Hi, I am using Ruby 1.8.6, the One Click Installer version, running on
windows 7. I use the scite text editor included with that ruby
distribution. Since I haven't tampered with the text editor's encoding
settings, my files are saved in the default, which seems to be "Code
Page Property".

As a simple test, I changed the encoding to UTF-8 and saved the file.
Now, the editor line looks like this:

puts "E1 E9 ED F3 FA"

But the output is still wrong.




> What version of Ruby are you running? What encoding are your files
> saved in? We will need to know this in order to be able to help out.
>
> If you're new to character encodings, in general or just in Ruby, this
> series might help:
> http://blog.grayproductions.net/cate...cter_encodings
>
> -greg


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Gregory Brown
Guest
Posts: n/a
 
      01-04-2010
On Sun, Jan 3, 2010 at 8:07 PM, tuti plain <(E-Mail Removed)> wrote:

> puts "E1 E9 ED F3 FA"
>
> But the output is still wrong.


If you're using Ruby 1.8.6, be sure to set $KCODE="U"

-greg

 
Reply With Quote
 
tuti plain
Guest
Posts: n/a
 
      01-11-2010
> If you're using Ruby 1.8.6, be sure to set $KCODE="U"

Hi thanks for your reply. Sorry I took so long to reply. I tried what
you said, but it didn't work either. I still see incorrect characters.
What else can I try?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Gregory Brown
Guest
Posts: n/a
 
      01-11-2010
On Mon, Jan 11, 2010 at 7:44 AM, tuti plain <(E-Mail Removed)> wrote:
>> If you're using Ruby 1.8.6, be sure to set $KCODE=3D"U"

>
> Hi thanks for your reply. =A0Sorry I took so long to reply. =A0I tried wh=

at
> you said, but it didn't work either. =A0I still see incorrect characters.
> What else can I try?


It's possible that you're using a terminal that doesn't play nice with
UTF-8 characters. Check your terminal settings.

-greg

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
internationalization without using resource files Jules ASP .Net 3 05-25-2005 08:28 AM
internationalization of Apps ???? =?Utf-8?B?UGl5dXNoIEdvdmls?= ASP .Net 0 06-02-2004 05:21 AM
internationalization problem continues. Francois Malgreve ASP .Net 0 12-29-2003 08:32 AM
Re: internationalization problem Natty Gur ASP .Net 1 12-23-2003 08:00 AM
Internationalization Problem Pablo Jose Almeida da Guia ASP .Net 0 12-05-2003 12:23 PM



Advertisments