會出現亂碼, 經查證是 com.maclema.mysql.ResultSet 裡的Code有問題
internal function initialize(charSet:String):void {
charSet = charSet;
....
}
以上是Source Code的部份, 這樣子是無法將外部定義的charSet傳入
需將 Code 修改為
internal function initialize(charSet:String):void {
this.charSet = charSet;
....
}
然後在MXML中使用MysqlService時, 需定義charSet="utf8"
<assql:MySqlService id="service"
hostname="localhost"
username="root"
password="smile69"
database="smilelight"
autoConnect="true"
charSet="utf8"
connect="handleConnected(event)"
sqlError="handleError(event)" />
中文字才會顯示正常
沒有留言:
張貼留言