Re: [J2SE] JTextField 與 MySQL 之間的問題

看板java作者 (Willie Liao)時間19年前 (2007/02/03 11:15), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
Add useUnicode=true&characterEncoding=utf8 Also, if you are using JSP, make the page encoding to UTF-8 Willie ※ 引述《NothingGood (沒好事)》之銘言: : 現有一個 JTextFiled 可以輸入文字,輸入完後儲存至資料庫中 : 然而我儲存至資料庫後會變成一堆問號 (因為輸入的是中文) : 在命令提示字元底下,我測試 insert 也是用中文字 : 就可以正常顯示 : 曾經試過 : String s = new String(JTextField.getText().getBytes(),"utf8"); : 或者是big5,也是不行,不曉得出了些什麼問題? : 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 69.143.17.31 ※ 編輯: willieliao 來自: 69.143.17.31 (02/03 11:16)
文章代碼(AID): #15m_vOe_ (java)
討論串 (同標題文章)
文章代碼(AID): #15m_vOe_ (java)