Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: From the author of WWW:Babelfish

by isotope (Chaplain)
on Feb 22, 2001 at 22:08 UTC ( #60277=note: print w/replies, xml ) Need Help??

in reply to From the author of WWW:Babelfish
in thread Translating Japanese to English with WWW::Babelfish

*light bulb illuminates*
I re-examined the Babelfish form HTML source... I was thinking it was specifying utf8 as the form encoding type, and was preparing to patch to use that encoding, but when I looked more carefully, I realized what I had seen was a hidden field... enc=utf8.
Patching as follows does the job, as long as the input has been converted to utf8:
--- WWW/ Wed Feb 21 10:33:42 2001 +++ WWW/ Thu Feb 22 08:56:09 2001 @@ -148,7 +148,7 @@ CHUNK: foreach $chunk ( $self->_chunk_text($MAXCHUNK, $para) ) { - $req = POST ($BABELFISH_URL, [ 'doit' => 'done', 'urltext' => $ +chunk, 'lp' => $langopt, 'Submit' => 'Translate' ]); + $req = POST ($BABELFISH_URL, [ 'doit' => 'done', 'urltext' => $ +chunk, 'lp' => $langopt, 'Submit' => 'Translate', 'enc' => 'utf8' ]); $ua = new LWP::UserAgent; $ua->proxy('http','http://' . $self->{proxy}) if defined $self- +>{proxy};


Replies are listed 'Best First'.
Re^2: From the author of WWW:Babelfish
by Anonymous Monk on Mar 19, 2014 at 09:32 UTC
    Could you please help me to run your scripts ? I have no experience in Perl, but I managed to install Perl, download your scripts, install Jcode and Babelfish. But when I substitute Babelfish with your script it gives lots of errors. My internet is through a proxy connection so it says it has no internet connection, this is first problem I think, then I don't understand how you input the files that need to be processed. Thanks!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://60277]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-05-27 03:57 GMT
Find Nodes?
    Voting Booth?