# Encode string to utf-8

**URL:** <https://www.ruby-forum.com/t/encode-string-to-utf-8/170827>\
**Category:** Rails\
**Created:** [June 23, 2009, 8:46am UTC](https://www.ruby-forum.com/t/encode-string-to-utf-8/170827 "2009-06-23T08:46:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![twittwit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@twittwit](https://www.ruby-forum.com/u/twittwit)\
**Post date:** [June 23, 2009, 8:46am UTC](https://www.ruby-forum.com/t/encode-string-to-utf-8/170827/1 "2009-06-23T08:46:03Z")

</div>

hi all,

i realised that rails provide string in non-encode format.  
may i know how can I encode it in utf-8?  
i tried using html\_helpers but i donno how to encode it?  
i typed this :

\<%= encode\_entities(“Über geek”) %\>

in my pdf.prawn at View but it does seems to work.

bryan
