On 10/22/07, venture Lee <liwenqiu / gmail.com> wrote:
> hi,all:
>   I have a problem, I don't know how to find out what is the current
> local encoding by ruby script, My script must can be run on windows or
> linux platform.
>   who can tell me how to do, thanks very much.

There's no cross-platform way of telling this. LC_LANG will tell you
some things (not always truthfully or usefully, since it can change)
on Linux. I'm not sure that there's an easy way to get what you want
from Ruby on Windows, as Ruby scripts run under the console (ruby.exe)
might return different values than Ruby scripts run without a console
(rubyw.exe), and you'd need a Win32API call.

You're probably better of reformulating what you want.

-austin
-- 
Austin Ziegler * halostatue / gmail.com * http://www.halostatue.ca/
               * austin / halostatue.ca * http://www.halostatue.ca/feed/
               * austin / zieglers.ca