case Types.VARCHAR:  if (fieldInfo == null) { String encoding = getIscEncoding(); int length = getXsqlvar(column).sqllen; return length / FBConnectionHelper.getIscEncodingSize(encoding); } else return fieldInfo.characterLength;
case Types.VARCHAR: { XSQLVAR var = getXsqlvar(column); int charset = var.sqlsubtype & 0xFF; int charSetSize = charset == 127  ? FBConnectionHelper.getIscEncodingSize(getIscEncoding()) : FBConnectionHelper.getCharacterSetSize(charset); return var.sqllen / charSetSize; }
    public  int getPrecision(int column) throws  SQLException {        int colType = getColumnType(column);        ExtendedFieldInfo fieldInfo = getExtFieldInfo(column);                switch (colType){                        case Types.DECIMAL:            case Types.NUMERIC:                            if (fieldInfo == null)                     return estimatePrecision(column);                else                    return fieldInfo.fieldPrecision;                            case Types.CHAR:            case Types.VARCHAR:                            if (fieldInfo == null) {                    String encoding = getIscEncoding();                    int length = getXsqlvar(column).sqllen;                    return length / FBConnectionHelper.getIscEncodingSize(encoding);                } else                    return fieldInfo.characterLength;                            case Types.FLOAT:                return 7;            case Types.DOUBLE:                return 15;            case Types.INTEGER:                return 10;            case Types.SMALLINT:                return 5;            case Types.DATE:                return 10;            case Types.TIME:                return 8;            case Types.TIMESTAMP:                return 19;            default:                return 0;            }        }