package test; |
02 |
03 | public class aaa { |
04 |
05 | |
06 | public static void main(String[] args) throws Exception { |
07 | String str = "我哈哈,你好,香港" ; |
08 | String encode = "GB2312" ; |
09 | |
10 | //話說 BIG5 |
11 | try { |
12 | if (str.equals( new String(str.getBytes(encode), encode))) { |
13 | System.out.println( "是简体" ); |
14 | |
15 | } else { |
16 | System.out.println( "是繁体" ); |
17 | } |
18 | } catch (Exception exception3) { |
19 | } |
20 |
21 | |
22 | } |
23 | } |