Project

General

Profile

« Previous | Next » 

Revision 5760

use detected document encoding or Metacat's default encoding (UTF-8)

View differences:

DBQuery.java
2005 2005
        byte[] byteString = null;
2006 2006
        ZipEntry zEntry = null;
2007 2007

  
2008
        byteString = docImpl.toString().getBytes();
2008
        byteString = docImpl.getBytes();
2009 2009
        //use docId as the zip entry's name
2010 2010
        zEntry = new ZipEntry(packageZipEntry + "/metadata/"
2011 2011
                + docImpl.getDocID());
......
2230 2230
            }//else
2231 2231
        }//for
2232 2232
        htmlDoc.append("</body></html>");
2233
        byteString = htmlDoc.toString().getBytes();
2233
        // use standard encoding even though the different docs might have use different encodings,
2234
        // the String objects in java should be correct and able to be encoded as the same Metacat default
2235
        byteString = htmlDoc.toString().getBytes(MetaCatServlet.DEFAULT_ENCODING);
2234 2236
        zEntry = new ZipEntry(packageZipEntry + "/metadata.html");
2235 2237
        zEntry.setSize(byteString.length);
2236 2238
        zipOut.putNextEntry(zEntry);

Also available in: Unified diff