Sunday, May 22, 2011

How to identify File encoding in Java?



I have this error "cannot read the file xxxx.jsp" when i am accessing some jsp screen..

I am ran into this issue when try to access some jsp page in my project. I found that Input data was not encoded in UTF-8 but our default encoding on Windows was set to UTF-8.

I fixed the input data to be UTF-8 encoded. It works well.

You can either fix the input or change the default encoding to something else.

This is the useful info is

http://www-128.ibm.com/developerworks/java/jdk/linux/142/runtimeguide.lnx.en.html

If your system locale is using a UTF-8 encoding, some SDK tools might throw a sun.io.MalformedInputException. To find out whether your system is using a UTF-8 encoding, examine the locale-specific environment variables such as LANG or LC_ALL to see if they end with the suffix ".UTF-8". If you get this sun.io.MalformedInputException, change characters that are not within the 7-bit ASCII range (0x00 - 0x7f) and are not represented as Java Unicode character literals to Java Unicode character literals (for example: '\u0080'). You can also work around this problem by removing the ".UTF-8" suffix from the locale-specific environment variables; for example, if your machine has default locale of "en_US.UTF-8", set LANG to "en_US".

2011年05月22日

礼拜天,没事做。

zzZzz...

Sunday, May 8, 2011

SQL1092N "USER" does not have the authority to perform therequested command

1. Set the registry variable DB2_GRP_LOOKUP = local and add the domain accounts (or global groups) to the local Administrators group.
- db2set DB2_GRP_LOOKUP=local ?g
2. create new group ?DB2ADMNS?
3. Add both db2admin user and domain user into DB2ADMNS group
4.Update the database manager configuration file to specify a new group.
Db2 update dbm cfg using sysadm_group DB2ADMNS
5. db2stop
6. db2start

Man Utd's next generation of wonderkids

Manchester United have set off on their pre-season United States tour with a number of young stars involved, but some other talents have lef...