Java PreparedStatement UTF-8 character problem

前端 未结 4 1700
长情又很酷
长情又很酷 2020-12-06 02:15

I have a prepared statement:

PreparedStatement st;

and at my code i try to use st.setString method.

st.setString(1, userNa         


        
4条回答
  •  悲&欢浪女
    2020-12-06 02:49

    setString methods changes 'şakça' to '?akça'

    How do you know that setString changes this? Or do you see the content in the database and decide this?

    It could be that the database is not configured for UTF-8, or simply that the tool you use to see the contects of the database (SQL*PLUS for Oracle...) is not capable of diaplaying UTF-8.

提交回复
热议问题