storing and retrieving different language characters in Postgres and JSP
How to store and retrieve data stored in diff开发者_JAVA百科erent languages (Could be Chinese, Hindi, French or any other which has peculiar characters in it).
- Create the database in PostgreSQL using UTF-8 as the character set
- Make sure all your web pages are encoded using UTF-8 (See this link for examples), this is mainly done using something like
<meta charset="UTF-8">
in your JSP pages - Make sure all your HTML forms have an
accept-charset="UTF-8"
attribute - Make sure that all your servlet container/application container sends and receives the data properly in UTF-8
精彩评论