Skip to content
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

charset mismatch on save_content #200

Open
spazm opened this issue May 8, 2017 · 0 comments
Open

charset mismatch on save_content #200

spazm opened this issue May 8, 2017 · 0 comments

Comments

@spazm
Copy link
Contributor

spazm commented May 8, 2017

[email protected] reported on Oct 14, 2011

What steps will reproduce the problem?
1. $mech->get('http://kakaku.com');
2. $mech->save_content('index.html');
3. nkf -g index.html # => utf-8

What is the expected output? What do you see instead?
"shift_jis" is expected, not "utf-8".
The page above is written in shift_jis.


What version of the product are you using? On what operating system?
1.70 on CentOS 5.x

Please provide any additional information below.

I guess something like below is needed in save_content() :

  my $enc = $self->res->encoding;
  open( $fh, ">:encoding($en)", $finename );


Thanks.
Yoshitomo KANEDA

Details

Imported from Google Code issue 221 via archive

  • Type: Defect
  • Date: Oct 14, 2011
  • Reporter: [email protected]
  • Owner: ----
  • Priority: Medium
  • Status: New
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant