On Wed, 26 Jan 2005 16:21:42 +0100, Ing. Branislav Gerzo <[EMAIL PROTECTED]> wrote: > Hi beginners@perl.org, > > how can I convert some text from windows-1250 codepage to ASCII ? > I tried: > > use Text::Iconv; > $c = Text::Iconv->new("WINDOWS-1250", "ASCII"); > print $cted = $c->convert("ÃÃÅ"); > > but returns nothing, I awaint "aez", I am running AS perl on Win. > anyone ? > > -- > > --. ,-- ,- ICQ: 7552083 \|||/ `//EB: www.2ge.us > ,--' | - |-- IRC: [2ge] (. .) ,\\SN: 2ge!2ge_us > `====+==+=+===~ ~=============-o00-(_)-00o-================~ > I used to watch TV...then I got a modem.
Are you sure? There's no newline, so make sure you're terminal isn't putting "aez" before your prompt. Also, are you sure that the input is what you think it is? What editor are you using, and what version of windows, what encoding are the characters being saved in when you write the script to disk? Don't forget, too, that there will be all sorts of background conversion going on here, both by Windows and by Perl itself, which will attempt to use locale. Try this on a file you're sure is encoded in WINDOWS-1250, and open it using :raw. Take a look at perldoc perllocale. HTH, --jay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>