/** * Returns the encoding used for diff output. * * @return charset name */ public String getEncoding() { if (hasEncoding()) { return myEncoding; } return getOptions().getNativeCharset(); }
/** * Returns the encoding used for diff output. * * @return charset name */ public String getEncoding() { if (hasEncoding()) { return myEncoding; } return getOptions().getNativeCharset(); }
/** * Returns the encoding used for diff output. * * @return charset name */ public String getEncoding() { if (hasEncoding()) { return myEncoding; } return getOptions().getNativeCharset(); }
public static String getCharset(String charset, String path, ISVNOptions options) throws SVNException { if (SVNProperty.NATIVE.equals(charset)) { charset = options.getNativeCharset(); } boolean isSupported = true; try { isSupported = charset == null || Charset.isSupported(charset); } catch (IllegalCharsetNameException e) { isSupported = false; } if (!isSupported) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Charset ''{0}'' is not supported on this computer; change svnkit:charset property value or remove that property for file ''{1}''", new Object[]{charset, path}), SVNLogType.DEFAULT); } return charset; } }
public static String getCharset(String charset, String mimeType, Object path, ISVNOptions options) throws SVNException { if (charset == null) { charset = getGlobalCharset(options, mimeType); } if (SVNProperty.NATIVE.equals(charset)) { charset = options.getNativeCharset(); } if (charset == null) { return null; } boolean isSupported; try { isSupported = Charset.isSupported(charset); } catch (IllegalCharsetNameException e) { isSupported = false; } if (!isSupported) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Charset ''{0}'' is not supported on this computer; change svnkit:charset property value or remove that property for file ''{1}''", new Object[]{charset, path}), SVNLogType.DEFAULT); } return charset; }
public static String getCharset(String charset, String mimeType, Object path, ISVNOptions options) throws SVNException { if (charset == null) { charset = getGlobalCharset(options, mimeType); } if (SVNProperty.NATIVE.equals(charset)) { charset = options.getNativeCharset(); } if (charset == null) { return null; } boolean isSupported = true; try { isSupported = charset == null || Charset.isSupported(charset); } catch (IllegalCharsetNameException e) { isSupported = false; } if (!isSupported) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Charset ''{0}'' is not supported on this computer; change svnkit:charset property value or remove that property for file ''{1}''", new Object[]{charset, path}), SVNLogType.DEFAULT); } return charset; }
private void ensureEncodingAndEOLSet() { if (getEOL() == null) { setEOL(SVNProperty.EOL_LF_BYTES); } if (getEncoding() == null) { final ISVNOptions options = getOptions(); if (options != null && options.getNativeCharset() != null) { setEncoding(options.getNativeCharset()); } else { setEncoding("UTF-8"); } } }