code: public static char toCharValue(Object o) throws PageException {
  	if (o instanceof Character) return ((Character) o).charValue();
  	else if (o instanceof Boolean) return (char) ((((Boolean) o).booleanValue()) ? 1 : 0);
  	else if (o instanceof Double) return (char) (((Double) o).doubleValue());
  	else if (o instanceof Number) return (char) (((Number) o).doubleValue());
  	else if (o instanceof String) {
  	    String str = o.toString();
  	    if (str.length() > 0) return str.charAt(0);
  	    throw new ExpressionException("can't cast empty string to a char");
  
  	}
  	else if (o instanceof ObjectWrap) {
  	    return toCharValue(((ObjectWrap) o).getEmbededObject());
  	}
  	else if (o == null) return toCharValue("");
  	throw new CasterException(o, "char");
      }
docs: cast a Object to a char value (primitive value type)
  
  @param o Object to cast
  @return casted char value
  @throws PageException