Java encoding : UTF-8, Big5, x-MS950-HKSCS
Suppose you got a file in Big5 containing some HKSCS characters (e.g. 深水埗, 赤鱲角, etc). When your environment (Ref: Charset.defaultCharset( ) ) is either UTF-8 / Big5, you will never get the things work.
The proper encoding should be "x-MS950-HKSCS"
This situation happens when I'm try the same pieces of code in Java console / Eclipse console and JSP @ Tomcat. While JSP works fine, but sucks in console mode. Finally I found the JSP is actually using encoding "x-MS950-HKSCS".
To set environment charset in Eclipse:
Right click on the file that you are going to execute (e.g. Testing.java), then "Properties" → "Run/Debug Settings" → "Common" → "Encoding". Type "x-MS950-HKSCS" in the field.
What a pity!
great
ReplyDeleteThe post is written in very a good manner and it entails many useful information for me. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept.
ReplyDeleteOracle Training in chennai
web designing training in chennai
web designing training in chennai | angularjs training in chennai
sas training institute in chennai
software testing training in chennai
This comment has been removed by the author.
ReplyDeletegreat blog
ReplyDeletesafety course in chennai
nebosh course in madurai