public static Encoding GetEncoding(DBVersion version, string CharSetName) { try { return Encoding.GetEncoding(GetChararcterSet(version, CharSetName).name); } catch (NotSupportedException) { return Encoding.GetEncoding(0); } }
public static CharacterSet GetChararcterSet(DBVersion version, string CharSetName) { CharacterSet set = mapping[CharSetName]; if (set == null) { throw new MySqlException("Character set '" + CharSetName + "' is not supported"); } return set; }
public MySqlField(MySqlConnection connection) { this.connection = connection; this.connVersion = connection.driver.Version; this.maxLength = 1; this.binaryOk = true; }
internal static MySqlDateTime Parse(string s, DBVersion version) { MySqlDateTime time = new MySqlDateTime(); return time.ParseMySql(s, version.isAtLeast(4, 1, 0)); }