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

**URL:** <https://www.ruby-forum.com/t/iconv-hangs-while-converting-chinese-utf-8-to-ascii-please-help/115871>\
**Category:** Ruby\
**Created:** [September 29, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/iconv-hangs-while-converting-chinese-utf-8-to-ascii-please-help/115871 "2007-09-29T15:55:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mister\_Yu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@Mister\_Yu](https://www.ruby-forum.com/u/Mister_Yu)\
**Post date:** [September 29, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/iconv-hangs-while-converting-chinese-utf-8-to-ascii-please-help/115871/1 "2007-09-29T15:55:48Z")

</div>

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+

---

<div class="post-metadata">

**Author:** ![Mister\_Yu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@Mister\_Yu](https://www.ruby-forum.com/u/Mister_Yu)\
**Post date:** [September 30, 2007, 3:21am UTC](https://www.ruby-forum.com/t/iconv-hangs-while-converting-chinese-utf-8-to-ascii-please-help/115871/2 "2007-09-30T03:21:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Mister\_Yu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/22d042/32.png) [@Mister\_Yu](https://www.ruby-forum.com/u/Mister_Yu)\
**Post date:** [September 30, 2007, 12:36pm UTC](https://www.ruby-forum.com/t/iconv-hangs-while-converting-chinese-utf-8-to-ascii-please-help/115871/3 "2007-09-30T12:36:12Z")

</div>

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.
