in reply to WWW::Mechanize encoding again...
That is, provide the string that would normally be used to identify the encoding of your "EUC encoded string" in the http and/or html header.$mech->add_header( Encoding => 'OFFICIAL_ENCODING_LABEL_FOR_YOUR_DATA' + );
Apart from that, it appears (from looking at the source for WWW::Mechanize) that there's nothing in the module to alter the encoding of data being passed through it to a given web server. So if you're having trouble getting the strings to go through correctly, you may need to exercise more control in your own code to manage encoding issues.
For example, there are some WM methods that allow you to pass an optional file handle for output; if you don't supply one, it prints to STDOUT in the "normal" (default) manner. This should usually do the right thing, but if/when it doesn't, maybe you need to supply a file handle with the correct encoding layer already assigned via the 3-arg open call.
BTW, is it really the case that referring to your data as "EUC" is sufficient to identify what it really is? I've seen references to 'euc-jp' and 'euc-kr' and 'euc-cn', but not the simple "euc" by itself -- which makes me wonder if maybe "euc" by itself is ambiguous... (Maybe your reference to "Jcode" would peg it to Japanese, but I wouldn't know.)
|
|---|