New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a problem with encoding and -i #6610
Comments
From chihchun@kalug.linux.org.twCreated by chihchun@kalug.linux.org.twI'm trying to use perl for convert big5 charset to utf8. The foo file perl -M'encoding "big5", STDOUT => "utf8";' -e 'while(<>){print};' foo The result print utf8 chars, it works fine. I added -i.bak the file "foo" is big5 and "foo.bak" is big5 too. perl -M'encoding "big5", STDOUT => "utf8";' -e 'while(<>){print};' -i.bak foo Perl Info
|
From ben.goldberg@hotpop.com"Rex Tsai (via RT)" wrote:
The problem is that when you print, it is going to the currently Since your default open mode was ":encoding(big5)", the select()ed Since you need the default open modes for input and output to be Try the following: perl -M"open=IN,:encoding(big5),OUT,:utf8" \ [untested] -- |
From chihchun@kalug.linux.org.tw[ben.goldberg <!--c--> <i>at</i> <!--a--> hotpop.com - Fri Jul 18
Without -i.bak , this command print correct utf8 string, |
From zefram@fysh.orgThere is no Perl bug here. This ticket should be closed. -zefram |
@tonycoz - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#22958 (status was 'rejected')
Searchable as RT22958$
The text was updated successfully, but these errors were encountered: