Skip to content

Commit

Permalink
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/org/jcodings/Encoding.java
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ public abstract class Encoding implements Cloneable {
protected final int minLength, maxLength;
private final boolean isFixedWidth, isSingleByte;
private boolean isAsciiCompatible;
protected boolean isUnicode = false;

private byte[]name;
private int hashCode;
@@ -100,6 +101,10 @@ public final boolean isAsciiCompatible() {
return isAsciiCompatible;
}

public final boolean isUnicode() {
return isUnicode;
}

/**
* If this encoding is capable of being represented by a Java Charset
* then provide it.
10 changes: 5 additions & 5 deletions src/org/jcodings/unicode/UnicodeEncoding.java
Original file line number Diff line number Diff line change
@@ -40,14 +40,14 @@
public abstract class UnicodeEncoding extends MultiByteEncoding {
private static final int PROPERTY_NAME_MAX_SIZE = 20;

protected UnicodeEncoding(String name, int minLength, int maxLength, int[]EncLen) {
// ASCII type tables for all Unicode encodings
super(name, minLength, maxLength, EncLen, null, UNICODE_ISO_8859_1_CTypeTable);
}

protected UnicodeEncoding(String name, int minLength, int maxLength, int[]EncLen, int[][]Trans) {
// ASCII type tables for all Unicode encodings
super(name, minLength, maxLength, EncLen, Trans, UNICODE_ISO_8859_1_CTypeTable);
isUnicode = true;
}

protected UnicodeEncoding(String name, int minLength, int maxLength, int[]EncLen) {
this(name, minLength, maxLength, EncLen, null);
}

@Override

0 comments on commit d38110b

Please sign in to comment.