久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      java向mysql寫入數(shù)據(jù)中文亂碼解決方法

      java向mysql寫入數(shù)據(jù)中文亂碼解決方法

      造成亂碼的原因是字符集不一致,通常只需要數(shù)據(jù)庫建表時候指定的字符集與java設(shè)置數(shù)據(jù)庫連接設(shè)置url指定的字符集一致。

      1、創(chuàng)建數(shù)據(jù)庫的時候:

      CREATE   DATABASE   `Db`  CHARACTER   SET   'utf8 '  COLLATE   'utf8_general_ci ';

      2、建表的時候:

      CREATE   TABLE   `TableA`   (     `ID`   varchar(40)   NOT   NULL   default   ' ',      `UserID`   varchar(40)   NOT   NULL   default   ' ',  )        ENGINE=InnoDB   DEFAULT   CHARSET=utf8;

      3、java設(shè)置數(shù)據(jù)庫url的時候:

      jdbc:mysql://localhost:3306/store_40?useUnicode=true&amp;characterEncoding=utf-8

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號