Hi,
Im working with xmprpc/client and the server Im working against
requires utf8 for my strings.
I found this article with google:
http://redhanded.hobix.com/inspect/futurismUnicodeInRuby.html
Is this for real? Is there no workaround for me to get my data to the
server with uft8 encoding?
Best,
martin
balony@gmail.com wrote:
Im working with xmprpc/client and the server Im working against
requires utf8 for my strings.
I found this article with google:
http://redhanded.hobix.com/inspect/futurismUnicodeInRuby.html
Is this for real? Is there no workaround for me to get my data to the
server with uft8 encoding?
You can use iconv or you can run an external pipe through GNU recode.
utf8_string = Iconv.new('iso-8859-1', 'utf-8').iconv(iso_8859_string)
* balony@gmail.com <balony@gmail.com>:
Dave Burt skrev:
[...]
> Is this for real? Is there no workaround for me to get my data to the
> server with uft8 encoding?
You can use iconv or you can run an external pipe through GNU recode.
utf8_string = Iconv.new('iso-8859-1', 'utf-8').iconv(iso_8859_string)
I'm running on a windows system, that could be a problem? Also
i'm getting "test.rb:4: uninitialized constant Iconv (NameError)"
when testing.
You'll need to put the line:
require 'iconv'
at the top of your program to use the Iconv.* functions. I don't
have access to a Windows box, but if it's part of Ruby's standard
library, I'd assume it's available on Windows.
- jeff -
···
balony@gmail.com wrote:
--
jeff mital
jmital@aracnet.com
Unix is simple. It just takes a genius to understand its simplicity.
- Dennis Ritchie
utf8_string = Iconv.new('iso-8859-1', 'utf-8').iconv(iso_8859_string)
I'm running on a windows system, that could be a problem? Also
i'm getting "test.rb:4: uninitialized constant Iconv (NameError)"
when testing.
You'll need to put the line:
require 'iconv'
at the top of your program to use the Iconv.* functions. I don't
have access to a Windows box, but if it's part of Ruby's standard
library, I'd assume it's available on Windows.
The One-Click Installer still doesn't include Iconv (the developers are
tracking it as an open issue).
The Rails wiki has some info on how to get it going:
http://wiki.rubyonrails.com/rails/show/iconv
(See the Windows section.)
To summarize, the Ruby-mswin32 distribution at
http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
contains the required files.
You can also get the required iconv.dll from gettext on SourceForge:
Cheers,
Dave