Module jEdit

Class RegexEncodingDetector

java.lang.Object
org.gjt.sp.jedit.io.RegexEncodingDetector
All Implemented Interfaces:
EncodingDetector

public class RegexEncodingDetector extends Object implements EncodingDetector
An encoding detector which finds regex pattern. This reads the sample in the system default encoding for first some lines and look for a regex pattern. This can fail if the stream cannot be read in the system default encoding or the pattern is not found at near the top of the stream.
Since:
4.3pre16
Author:
Kazutoshi Satoda
  • Field Details

    • VALID_ENCODING_PATTERN

      public static final String VALID_ENCODING_PATTERN
      A regex pattern matches to "Charset names" specified for java.nio.charset.Charset.
      See Also:
  • Constructor Details

    • RegexEncodingDetector

      public RegexEncodingDetector(String pattern, String replacement)
  • Method Details