KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > portletcontainer > imp > TestCharacterEncoding


1 /*
2  * Copyright 2001-2003 The eXo platform SARL All rights reserved.
3  * Please look at license.txt in info directory for more license detail.
4  */

5
6 package org.exoplatform.services.portletcontainer.imp;
7
8 import java.io.UnsupportedEncodingException JavaDoc;
9
10 /**
11  * Created y the eXo platform team
12  * User: Benjamin Mestrallet
13  * Date: 25 ao�t 2004
14  */

15 public class TestCharacterEncoding extends BaseTest{
16   public TestCharacterEncoding(String JavaDoc s) {
17     super(s);
18   }
19
20   public void testSetCharacterEncoding() throws UnsupportedEncodingException JavaDoc {
21     String JavaDoc s = "\u00e1zov portletu";
22     System.out.println("STRING "+s);
23
24     s = "\u0160t\u00fdl";
25     System.out.println("STRING "+s);
26
27     s = "\u8D1F\u8F7D\u6D4B\u8BD5";
28     System.out.println(new String JavaDoc(s.getBytes(), "UTF-8"));
29
30     s = "\u5355\u5143\u6D4B\u8BD5cc";
31     System.out.println(new String JavaDoc(s.getBytes(), "UTF-8"));
32
33     System.out.println("�tre aim� et d�t�st� to�t � la fois c'�st �a");
34
35     s = "Septemberov\u00fd \u010dl\u00e1nok";
36     System.out.println(s);
37     System.out.println(new String JavaDoc(s.getBytes(), "UTF-8"));
38
39     s = "�l�nok Spr�vy Testy za�a�enia";
40     System.out.println(new String JavaDoc(s.getBytes(), "ISO-8859-2"));
41   }
42 }
43
Popular Tags