class UserServiceImpl implements UserService {

    @Override
    public String getUserCharset(final Identity identity) {
        String charset;
        charset = WebappHelper.getDefaultCharset();
        final PropertyImpl p = propertyManager.findProperty(identity, null, null, null, CHARSET);
        if (p != null) {
            charset = p.getStringValue();
            // if after migration the system does not support the charset choosen by a
            // user
            // (a rather rare case)
            if (!Charset.isSupported(charset)) {
                charset = WebappHelper.getDefaultCharset();
            }
        } else {
            charset = WebappHelper.getDefaultCharset();
        }
        return charset;
    }

      UserServiceImpl();

}