[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Iconv hangs while converting chinese UTF-8 to ascii, please help.

Mister Yu

9/29/2007 1:51:00 PM

hello all, i am a rails developer. i ran into this problem when i m
using permalink_fu to generating permalink field.

it runs perfectly when the field is purely english characters, but
when it tries to convert a field with chinese characters, it hangs.

i trace it down until i got to the line with Iconv in the console,
everytime i execute the following, it hangs:


Code :

Iconv.iconv('ascii//ignore//translit','utf-8','some chinese
characters here ???' )

does anyone else run into this problem?thank you

if it helps to list what machine i m on:

Windows XP
ruby 1.8.6
AMD64 3000+

2 Answers

Nobuyoshi Nakada

9/30/2007 1:21:00 AM

0

Hi,

At Sat, 29 Sep 2007 22:55:03 +0900,
Mister Yu wrote in [ruby-talk:271650]:
> i trace it down until i got to the line with Iconv in the console,
> everytime i execute the following, it hangs:

How and from where did you install ruby and libiconv?

--
Nobu Nakada

Mister Yu

9/30/2007 10:33:00 AM

0

Hi,

It's the Windows One-Click Installer from Ruby's homepage.

I tried to install it to my Windows Vista partition and i got the same
result.

As long as there is chinese characters in the string, it hangs there,
until i press ctrl-c and return, it goes back to the prompt.


On Sep 30, 2:21 am, Nobuyoshi Nakada <n...@ruby-lang.org> wrote:
> Hi,
>
> At Sat, 29 Sep 2007 22:55:03 +0900,
> Mister Yu wrote in [ruby-talk:271650]:
>
> > i trace it down until i got to the line with Iconv in the console,
> > everytime i execute the following, it hangs:
>
> How and from where did you install ruby and libiconv?
>
> --
> Nobu Nakada