File: fix_set_encoding

package info (click to toggle)
httpunit 1.7%2Bdfsg-16
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,580 kB
  • sloc: java: 33,665; xml: 484; makefile: 10
file content (17 lines) | stat: -rwxr-xr-x 1,010 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Author: Miguel Landaeta <miguel@miguel.cc>
Description: method setCharEncoding from Tidy class was removed from API.
 now the methods setInputEncoding and setOutputEncoding must be used.

diff -urNad httpunit-1.7+dfsg~/src/com/meterware/httpunit/parsing/JTidyHTMLParser.java httpunit-1.7+dfsg/src/com/meterware/httpunit/parsing/JTidyHTMLParser.java
--- httpunit-1.7+dfsg~/src/com/meterware/httpunit/parsing/JTidyHTMLParser.java	2008-05-20 16:25:36.000000000 +0000
+++ httpunit-1.7+dfsg/src/com/meterware/httpunit/parsing/JTidyHTMLParser.java	2009-03-04 21:25:54.000000000 +0000
@@ -87,7 +87,8 @@
 
     private static Tidy getParser( URL url ) {
         Tidy tidy = new Tidy();
-        tidy.setCharEncoding( org.w3c.tidy.Configuration.UTF8 );
+        tidy.setInputEncoding( "UTF8" );
+        tidy.setOutputEncoding( "UTF8" );
         tidy.setQuiet( true );
         tidy.setShowWarnings( HTMLParserFactory.isParserWarningsEnabled() );
         if (!HTMLParserFactory.getHTMLParserListeners().isEmpty()) {