From: Austin Ziegler Date: 2006-11-08T09:05:02+09:00 Subject: Re: Unicode in irb on windows (respectively script/console in instantrails) On 11/7/06, Austin Ziegler wrote: > On 11/7/06, michael.raidel@gmail.com wrote: > > I have a problem with Unicode in irb on Windows. I recognized it when > > trying to save an attribute of an ActiveRecord-Model with an umlaut > > (for example "�") in script/console. If the database connection is > > encoded in utf8, everything after the umlaut gets truncated, in the > > default encoding I get funny characters back. It doesn't matter if the > > $KCODE is set to UTF8 or NONE, the character number stays the same > > (also on plain irb)! > The windows console -- also used by cygwin -- doesn't recognise UTF-8. > (That is, it's not possible to properly display UTF-8 in cmd.exe, at > least so far as I can tell.) Ack my bad. I had forgotten: you can specify the UTF-8 codepage (CP_UTF8) with: chcp 65001 There are some caveats, of course: http://blogs.msdn.com/michkap/archive/2006/03/06/544251.aspx -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca