# Does Rails provide solid support for UTF-8?

**URL:** <https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513>\
**Category:** Rails\
**Created:** [April 11, 2006, 5:17pm UTC](https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513 "2006-04-11T17:17:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidjrice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Post date:** [April 11, 2006, 5:17pm UTC](https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513/1 "2006-04-11T17:17:26Z")

</div>

I need to use UTF-8 in my app and was wondering if Rails would support  
it properly.  
Some sites seem to be saying that it has weak internationalization  
support. Is this true? If so, where is the problem? What should I look  
out for?  
Are there tweaks, plugins or gems that fix the problem?  
TIA.

David

---

<div class="post-metadata">

**Author:** ![davidjrice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Post date:** [April 11, 2006, 5:29pm UTC](https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513/2 "2006-04-11T17:29:21Z")

</div>

Hi,

my app is utf-8, and i have no problem. There’s a tuto somewhere that  
explains how to do that. The only issue was with pdf-writer, which (when  
i  
made the application) did not support utf-8 (but i found a workaround).

Small warning: be very careful that your editor, as well as the editor  
of  
anyone touching your app, is encoding files in utf-8

---

<div class="post-metadata">

**Author:** ![davidjrice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Post date:** [April 11, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513/3 "2006-04-11T17:46:29Z")

</div>

Nicolas B. wrote:

> Hi,
> 
> my app is utf-8, and i have no problem. There’s a tuto somewhere that  
> explains how to do that. The only issue was with pdf-writer, which (when  
> i  
> made the application) did not support utf-8 (but i found a workaround).

Thanks, Nicolas!  
If you happen to remember the tuto and workaround for the pdf-writer,  
let me know. TIA.  
BTW, I’m planning to set up the following:

- OS: FreeBSD
- Web server: Lighttpd
- DB: MySQL
- Misc: Sessions stored in DB

Any known UTF-8 problems with that?

---

<div class="post-metadata">

**Author:** ![davidjrice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Post date:** [April 11, 2006, 8:50pm UTC](https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513/4 "2006-04-11T20:50:08Z")

</div>

David R. wrote:

> I need to use UTF-8 in my app and was wondering if Rails would support  
> it properly.  
> Some sites seem to be saying that it has weak internationalization  
> support. Is this true? If so, where is the problem? What should I look  
> out for?  
> Are there tweaks, plugins or gems that fix the problem?

AFAIK, Ruby’s string functions doesn’t support utf-8.  
And I presume that weak internationalization support mean “RoR doesn’t  
provide an unified internationalization solution”, you need to rely on  
third party code which is certainly a problem.

---

<div class="post-metadata">

**Author:** ![davidjrice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Post date:** [April 12, 2006, 1:33am UTC](https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513/5 "2006-04-12T01:33:15Z")

</div>

[http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings](http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings)

The nasty warnings at the top of that page are too strong. Our app is  
using UTF-8 in Rails extensively and we’re having no problems at all,  
even with a bunch of Japanese users. You’ve just got to be a little  
careful given that Ruby 1.8.\* doesn’t have much unicode support in  
its built-in string handling.

Pete Y.  
[http://9cays.com](http://9cays.com)

---

<div class="post-metadata">

**Author:** ![davidjrice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Post date:** [April 12, 2006, 2:42pm UTC](https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513/6 "2006-04-12T14:42:13Z")

</div>

Pete,

Thanks a lot for the link and encouraging news re your own experience  
using UTF-8!

BTW, the page says “This is being looked at” (i.e., they are looking  
into how to fix the problem w/ Ruby not handling UTF-8 properly), but  
does anyone happen to know if there are any concrete plans to  
incorporate thorough support for Unicode in Ruby?

David

---

<div class="post-metadata">

**Author:** ![davidjrice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Post date:** [April 14, 2006, 1:29am UTC](https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513/7 "2006-04-14T01:29:03Z")

</div>

Pete Y. wrote:

> [http://redhanded.hobix.com/inspect/futurismUnicodeInRuby.html](http://redhanded.hobix.com/inspect/futurismUnicodeInRuby.html)

Thanks, Pete! I’m definitely looking forward to 2.0, but it seems 1.8.x  
will do the trick for now.

---

<div class="post-metadata">

**Author:** ![davidjrice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Post date:** [April 13, 2006, 1:07am UTC](https://www.ruby-forum.com/t/does-rails-provide-solid-support-for-utf-8/57513/8 "2006-04-13T01:07:46Z")

</div>

[http://redhanded.hobix.com/inspect/futurismUnicodeInRuby.html](http://redhanded.hobix.com/inspect/futurismUnicodeInRuby.html)
