Search in sources :

Example 11 with JSPResourceEncodingDetector

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

the class JSPEncodingTests method testUTF16BOM.

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

Example 12 with JSPResourceEncodingDetector

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

the class JSPEncodingTests method testUTF16WithJapaneseChars.

public void testUTF16WithJapaneseChars() throws IOException {
    String filename = fileLocation + "utf16WithJapaneseChars.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 13 with JSPResourceEncodingDetector

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

the class JSPEncodingTests method testUTF16.

/**
 * Caution, when this file prints out in console (when debug set to true,
 * it appears incorrect (due to font problems in console).
 */
public void testUTF16() throws IOException {
    String filename = fileLocation + "testUTF16.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 14 with JSPResourceEncodingDetector

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

the class JSPEncodingTests method testdefect4205wpsjsp.

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

Example 15 with JSPResourceEncodingDetector

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

the class JSPEncodingTests method testJSPEmptyFile.

public void testJSPEmptyFile() throws IOException {
    String filename = fileLocation + "EmptyFile.jsp";
    doTestFileStream(filename, "ISO-8859-1", 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