Search in sources :

Example 6 with JSPResourceEncodingDetector

use of org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector in project webtools.sourceediting by eclipse.

the class JSPEncodingTests method testXMLIllformedNormalNonDefault.

public void testXMLIllformedNormalNonDefault() throws IOException {
    String filename = fileLocation + "IllformedNormalNonDefault.jsp";
    String ianaInFile = "ISO-8859-8";
    doTestFileStream(filename, ianaInFile, new JSPResourceEncodingDetector());
}
Also used : JSPResourceEncodingDetector(org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector)

Example 7 with JSPResourceEncodingDetector

use of org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector in project webtools.sourceediting by eclipse.

the class JSPEncodingTests method testUTF16leXmlStyle.

public void testUTF16leXmlStyle() throws IOException {
    String filename = fileLocation + "utf16le_xmlStyle.jsp";
    doTestFileStream(filename, "UTF-16LE", new JSPResourceEncodingDetector());
}
Also used : JSPResourceEncodingDetector(org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector)

Example 8 with JSPResourceEncodingDetector

use of org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector in project webtools.sourceediting by eclipse.

the class JSPEncodingTests method testUTF83ByteBOM.

public void testUTF83ByteBOM() throws IOException {
    String filename = fileLocation + "UTF8With3ByteBOM.jsp";
    doTestFileStream(filename, "UTF-8", new JSPResourceEncodingDetector());
}
Also used : JSPResourceEncodingDetector(org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector)

Example 9 with JSPResourceEncodingDetector

use of org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector in project webtools.sourceediting by eclipse.

the class JSPEncodingTests method testUtf16UnicodeStreamWithNoEncodingInHeaderBE.

/**
 * This test shows unicode BOM should take priority over settings/defaults
 * Note: UTF-16 == UTF-16BE
 */
public void testUtf16UnicodeStreamWithNoEncodingInHeaderBE() throws IOException {
    String filename = fileLocation + "utf16UnicodeStreamWithNoEncodingInHeaderBE.jsp";
    // [228366] Encoding changes: For UTF-16 with BOM, the expected should be UTF-16
    doTestFileStream(filename, "UTF-16", new JSPResourceEncodingDetector());
}
Also used : JSPResourceEncodingDetector(org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector)

Example 10 with JSPResourceEncodingDetector

use of org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector in project webtools.sourceediting by eclipse.

the class JSPEncodingTests method testUTF16be.

public void testUTF16be() throws IOException {
    String filename = fileLocation + "utf16be.jsp";
    doTestFileStream(filename, "UTF-16BE", new JSPResourceEncodingDetector());
}
Also used : JSPResourceEncodingDetector(org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector)

Aggregations

JSPResourceEncodingDetector (org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector)17 EncodingMemento (org.eclipse.wst.sse.core.internal.encoding.EncodingMemento)2 BufferedInputStream (java.io.BufferedInputStream)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 InputStream (java.io.InputStream)1