From: nobu.nokada@... Date: 2003-09-25T20:37:54+09:00 Subject: Re: repost: system encoding? Hi, At Thu, 25 Sep 2003 19:41:57 +0900, Emmanuel Touzery wrote: > I'm reading data from different encodings (web pages), i first > thought about converting all to unicode, but it's not handy right now in > ruby. Then i thought i might as well convert it all to my local encoding > for easy processing in ruby (uppercase, regexps etc) [1]. it's easy to > hardcode my local encoding in the app, but i'd like to make it generic, > to work at my work (windows, cp1250) and at home (linux, iso8859-2). > Hence the question: how can i get a string of my local encoding, on > linux or windows? or how do i tell iconv "convert to my local encoding"? On many unixes, environment variables LC_CTYPE or LANG would be used for that purpose. Current linux's iconv accepts both of iso8859-2 and cp1250, and I expect libiconv for win32 does too. -- Nobu Nakada