Chinese issues caused by database SQLServer driver versions.

xiaoxiao2021-03-06  62

Today, I found a strange question when I was a debugging JSP: When I read data from the database through JDBC, I was garbled when I met Chinese.

NEW STRING ("ISO8859-1", "GBK") is no problem.

I run the same code on my machine, there is no problem. Chinese normal display. No need to do any transcodation.

I am trying to be a problem with the character set of his local machine. (Not after confirmation)

Then I suspect that there is a problem with Tomcat's characters (but it is not possible, after all, I passed the JDBC call, just borrow Tomcat's connection pool. Will not be so unlucky)

But in order to confirm, it is still written in Eclipse, directly connects the database, and there is still a problem in the machine's machine. (Impressed:))

Finally, I thought of the driver, it is definitely a driver problem. Check the driver of colleagues, it is much smaller than me.

There is no problem over covering.

转载请注明原文地址:https://www.9cbs.com/read-84726.html

New Post(0)