Bug #2783 I Can't find encoding property(getter, setter method)
Submitted: 13 Feb 2004 17:39 Modified: 13 Feb 2004 17:49
Reporter: numi moo Email Updates:
Status: Closed Impact on me:
Category:Connector / J Severity:S3 (Non-critical)
Version:mysql-connector-java-3.0.10-stable OS:Windows (ms w2k)
Assigned to: Mark Matthews CPU Architecture:Any

[13 Feb 2004 17:39] numi moo

I can found encoding protected field in connect J source code

-------------------- in source code -----------------
    /** Character Encoding */
    protected String encoding = null;

but I can't find setEncoding and getEncoding method.

I want set encoding property

  MysqlDataSource mysqlDS= new MysqlDataSource();

  mysqlDS.setEncoding("EUC-KR"); <---- this


How to repeat:
my web papge has broken string 

Suggested fix:
add getEncoding() method 


add setEncoding(String enc) method
[13 Feb 2004 17:49] Mark Matthews
You can set this property via the MysqlDataSource.setURL() property, however setting the default character set of your database correctly will allow the driver to automatically configure itself. You should only use the encoding property if you are trying to store a character set your given version of MySQL doesn't support (usually UTF-8 before MySQL-4.1.1).

MySQL-3.1.1 and newer allow direct access to this property.