# UTF-8 problems

**URL:** <https://www.ruby-forum.com/t/utf-8-problems/73717>\
**Category:** Ruby\
**Created:** [October 26, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/utf-8-problems/73717 "2006-10-26T17:06:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![capeboylego](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@capeboylego](https://www.ruby-forum.com/u/capeboylego)\
**Post date:** [October 26, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/utf-8-problems/73717/1 "2006-10-26T17:06:09Z")

</div>

Hi,  
I (perhaps stupidly) decided to compile and install 1.8.5 on my Mac,  
thinking there might have been some improvements to Ruby. So, I did, and  
I  
fiddled around with settings, changing the default encoding to UTF-8  
instead of whatever it was before, and the secondary was Shift-JIS.  
Problems…

1. If I write, for example,  
puts “???”  
It does that annoying Mac thing…  
puts “\343\201\253\343\202\203\343\203\274”

I had this previously fixed for other Terminal things.

1. ri won’t install, period. It keeps giving me weird errors that I  
forgot  
to copy and paste here. It compiles itself and then stops, with lots of  
errors.

Should I just reinstall and start over?

Cameron

---

<div class="post-metadata">

**Author:** ![capeboylego](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@capeboylego](https://www.ruby-forum.com/u/capeboylego)\
**Post date:** [October 26, 2006, 5:40pm UTC](https://www.ruby-forum.com/t/utf-8-problems/73717/2 "2006-10-26T17:40:14Z")

</div>

On Fri, 27 Oct 2006, Cameron A. wrote:

> I had this previously fixed for other Terminal things.
> 
> 1. ri won’t install, period. It keeps giving me weird errors that I forgot  
> to copy and paste here. It compiles itself and then stops, with lots of  
> errors.
> 
> Should I just reinstall and start over?
> 
> Cameron

what does this do

LANG=C ruby -e’ puts “???” ’

??

-a

---

<div class="post-metadata">

**Author:** ![capeboylego](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@capeboylego](https://www.ruby-forum.com/u/capeboylego)\
**Post date:** [October 26, 2006, 5:52pm UTC](https://www.ruby-forum.com/t/utf-8-problems/73717/3 "2006-10-26T17:52:16Z")

</div>

I to am having trouble with ruby on my mac after a build and install  
from source of v 1.8.5.

Ruby is running fine (so far) however irb broke. I get the following  
error:

$ irb  
dyld: NSLinkModule() error  
dyld: Symbol not found: \_rl\_filename\_completion\_function  
Referenced from: /usr/local/lib/ruby/site\_ruby/1.8/powerpc-  
darwin8.8.0/readline.bundle  
Expected in: flat namespace

Trace/BPT trap

Based on info from an online post I tried a rebuild with the  
configure option --with-readline-dir=/usr/local but that didn’t help.

Has anyone else had this problem.

- Brian

---

<div class="post-metadata">

**Author:** ![capeboylego](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@capeboylego](https://www.ruby-forum.com/u/capeboylego)\
**Post date:** [October 26, 2006, 10:12pm UTC](https://www.ruby-forum.com/t/utf-8-problems/73717/4 "2006-10-26T22:12:46Z")

</div>

Cameron A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I (perhaps stupidly) decided to compile and install 1.8.5 on my Mac,

me too, BUT i was even more prudent than you, i’ve used MacPort in irder  
to install Ruby 1.8.5 and now i do have a broken install for rubygems  
and rubycocoa,…

---

<div class="post-metadata">

**Author:** ![capeboylego](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@capeboylego](https://www.ruby-forum.com/u/capeboylego)\
**Post date:** [October 27, 2006, 5:33pm UTC](https://www.ruby-forum.com/t/utf-8-problems/73717/5 "2006-10-27T17:33:53Z")

</div>

Just in case anyone else is still having trouble upgrading to v1.8.5  
(in my case, from 1.8.4) on Mac 10.4, here is how I resolved the  
following issue.

### Issue

~$ irb  
dyld: NSLinkModule() error  
dyld: Symbol not found: \_rl\_filename\_completion\_function  
Referenced from: /usr/local/lib/ruby/site\_ruby/1.8/powerpc-  
darwin8.8.0/readline.bundle  
Expected in: flat namespace

Trace/BPT trap  
############

### Steps to fix the above readline issue

~$ sudo rm -Rf /usr/local/lib/ruby  
~$ mkdir tmp  
~$ cd tmp  
~/tmp$ wget “ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz”  
~/tmp$ tar zxvf ruby-1.8.5.tar.gz  
~/tmp$ cd ruby-1.8.5  
~/tmp/ruby-1.8.5$ ./configure  
~/tmp/ruby-1.8.5$ make  
~/tmp/ruby-1.8.5$ sudo make install

~/tmp/ruby-1.8.5$ cd ext/readline  
~/tmp/ruby-1.8.5/ext/readline$ make distclean  
~/tmp/ruby-1.8.5/ext/readline$ ruby extconf.rb  
~/tmp/ruby-1.8.5/ext/readline$ make  
~/tmp/ruby-1.8.5/ext/readline$ sudo cp readline.bundle /usr/local/  
lib/ruby/1.8/powerpc-darwin8.8.0/readline.bundle  
~/tmp/ruby-1.8.5/ext/readline$ cd ~  
~$ irb  
irb(main):001:0\>

Yes, I’m not sure if blowing away the /usr/local/lib/ruby dir was the  
best decision, but irb works now.  
I hope this helps anyone else who experiences this same problem.

- Brian

---

<div class="post-metadata">

**Author:** ![capeboylego](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@capeboylego](https://www.ruby-forum.com/u/capeboylego)\
**Post date:** [October 27, 2006, 6:13pm UTC](https://www.ruby-forum.com/t/utf-8-problems/73717/6 "2006-10-27T18:13:58Z")

</div>

Brian E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Yes, I’m not sure if blowing away the /usr/local/lib/ruby dir was the  
> best decision, but irb works now.

some times…

in my case i need rubycocoa then afaik i need to install ruby using  
darwinports.

i’ve allready other rubies installed on my computer, for example one  
specifically dedicated to jruby i think it’s 1.9.
