Re: bug in perl or in my head ;-)

2007-06-20 Thread Martin Barth
Thank you I learnt a lot! Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: bug in perl or in my head ;-)

2007-06-19 Thread Dr.Ruud
Martin Barth schreef: > [use encoding] > If I understand you right, following code should allways create a utf8 > encoded file. No, "use encoding" is about the encoding of your script, not about file IO. encoding - allows you to write your script in non-ascii or non-utf8 > Since my inputfile

Re: bug in perl or in my head ;-)

2007-06-19 Thread Martin Barth
Hi jay, > You haven't told us what Perl thinks the encoding of the first file > is. how can I do that? > file is a system command that makes use of number of different > approaches to determine file type including, on some systems, I think > it even makes use of metadata. Actually examinin

Re: bug in perl or in my head ;-)

2007-06-19 Thread Jay Savage
On 6/18/07, Martin Barth <[EMAIL PROTECTED]> wrote: Hi there, have a look at: % cat datei eine test datei die "u "a "o % file datei datei: ASCII text % cp datei datei.bk % perl -wpi -e 'use encoding "utf8"; s/"a/รค/' datei % file datei datei: ISO-8859 text % perl -wp -e 'use encoding "utf8"; s/"

Re: bug in perl or in my head ;-)

2007-06-19 Thread Martin Barth
> Probably. It's worth a bug report, at least. I sent it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: bug in perl or in my head ;-)

2007-06-18 Thread Tom Phoenix
On 6/18/07, Martin Barth <[EMAIL PROTECTED]> wrote: I'm a bit confused. Both files should be utf8?? Probably. It's worth a bug report, at least. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] htt