Since database has to interface with legacy system which store Chinese in "Big5", my webapp must also store in "Big5".
I'm using postgresql 7.3.
I did not change the encoding. I used "createdb dbname" since other command like "createdb -E EUC_TW dbname" will reject my insert statement because the field may contain both Chinese and English.
Here are some setting I used:
servlet:
- request.setCharacterEncoding("BIG5"
- rs.setString(1, name); //name = "³¯®¦¼Ö"
- insert into table1 (name) values ('³¯®¦¼Ö'); // ok
- jsp read the field
java.lang.String(rs.getBytes(col_name),"BIG5"
but it display "? ³æ ?"
However, when I copy the insert statement and paste in "putty", correct when insert and display ?!
I'm using postgresql 7.3.
I did not change the encoding. I used "createdb dbname" since other command like "createdb -E EUC_TW dbname" will reject my insert statement because the field may contain both Chinese and English.
Here are some setting I used:
servlet:
- request.setCharacterEncoding("BIG5"
- rs.setString(1, name); //name = "³¯®¦¼Ö"
- insert into table1 (name) values ('³¯®¦¼Ö'); // ok
- jsp read the field
java.lang.String(rs.getBytes(col_name),"BIG5"
but it display "? ³æ ?"
However, when I copy the insert statement and paste in "putty", correct when insert and display ?!