unicode help
I have what I think is a simple problem that I can't seem to figure out. I am working with Korean unicode which requires me to use a decimal formula to calculate the correct symbol in my program. The problem is that once I get this decimal I have not been able to get it back into a format that the computer is happy with. Here's my code.
private String toHex(int d) {
String digits = "0123456789ABCDEF";
if (d=0) return "";
String hex = "";
while (d>0)
int digit = d % 16;
hex = digits.charAt(digit) + hex;
d = d / 16;
}
return hex;
}
So I give it an int of 44032 and this gives me a string with a value of AC00.
What I want it to do is to give me \uAC00. So I'd like to change the return variable to char
private char toHex(int d)
...
and have it give me the unicode back.
I have tried to concatenate a string together with something like this
String unicode = ("\u" + hex):
but the compiler doesn't like the \u without the HEX characters
so I tried this
String unicode = ("\\u" + hex);
so now the string is correct but it is read as a string vice a char :(
Any help would be appreciated.

