in reply to HTML::TreeBuilder, UTF-8 input, windows-1252 output

binmode OUT, ':cp1252';

Didn't you get a warning 'Unknown PerlIO layer "cp1252" at...'?  (if not, you should enable warnings)

The correct syntax is ':encoding(cp1252)'