01: /* J_LZ_COPYRIGHT_BEGIN *******************************************************
02: * Copyright 2001-2006 Laszlo Systems, Inc. All Rights Reserved. *
03: * Use is subject to license terms. *
04: * J_LZ_COPYRIGHT_END *********************************************************/
05:
06: package org.openlaszlo.test;
07:
08: import java.net.*;
09: import java.io.*;
10:
11: public class dec2utf8 {
12: public static void main(String[] args) throws IOException {
13:
14: StringBuffer buf = new StringBuffer();
15:
16: for (int i = 0; i < args.length; i++) {
17: String b = args[i];
18: Character c = new Character((char) Integer.parseInt(b));
19: buf.append(c);
20: }
21:
22: String out = buf.toString();
23: byte outb[] = out.getBytes("UTF8");
24:
25: for (int i = 0; i < outb.length; i++) {
26: System.out.print("0x" + Integer.toHexString(outb[i]) + " ");
27: }
28: }
29:
30: }
|