开发者

encountering a square or null or ? mark in retrieving utf-8 characters from mysql database in java

开发者 https://www.devze.com 2023-02-17 19:49 出处:网络
There is no problem when I try to insert this symbol \"ñÑ\" in the mysql database. However, when I try to retrieve the same data the symbol or character that was selected by the quer开发者_如何学JAV

There is no problem when I try to insert this symbol "ñÑ" in the mysql database. However, when I try to retrieve the same data the symbol or character that was selected by the quer开发者_如何学JAVAy would appear as null value or something like a ? or a square.

Please help me with these I have been troubled many weeks by these problems. I just cannot understand anymore. I have written the code in java.


The "�" is the replacement character, used when something processing characters can't display or otherwise handle a character. A box is sometimes used for the same purpose, or indicates that the font being used doesn't have a glyph for some character.

To resolve this, check that the character sets being used for the various components, such as the column and connection, are correct.

See also: "Setting the default Java character encoding?"

0

精彩评论

暂无评论...
验证码 换一张
取 消