Re: Help with Unicode decompiling problem

From: Ashley Yakeley (ashley@semantic.org)
Date: Thu Nov 04 1999 - 18:48:50 EST

At 1999-11-04 09:01, John Cowan wrote:

> private static final char[] hex = {'0', '1', '2', '3', '4', '5', '6',
>'7', '8', '9',
> 'A', 'B', 'C', 'D', 'E', 'F'};
> private static char[] hexBuffer = {'\\', 'u', '0', '0', '0', '0'};
> public String hexRep(char c)
> {
> hexBuffer[2] = hex[(c >> 12) & 0xF];
> hexBuffer[3] = hex[(c >> 8) & 0xF];
> hexBuffer[4] = hex[(c >> 4) & 0xF];
> hexBuffer[5] = hex[c & 0xF];
> return new String(hexBuffer);
> }

Almost there...

private static final char[] hex = {'0', '1', '2', '3', '4', '5', '6',
'7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'};
private static char[] hexBuffer = {'\\', 'u', '0', '0', '0', '0'};
public String hexRep(char c)
{
hexBuffer[2] = hex[(c >>> 12) & 0xF];
hexBuffer[3] = hex[(c >>> 8) & 0xF];
hexBuffer[4] = hex[(c >>> 4) & 0xF];
hexBuffer[5] = hex[c & 0xF];
return new String(hexBuffer);
}

```--
Ashley Yakeley, Seattle WA
Almost empty page: <http://semantic.org/>
```

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:54 EDT