Friday, 15 April 2011

Retrieving the Unicode value of char: Java -


I'm looking for a way to recover the Unicode value for a given four, and if it is possible, Keep in Java any inbuilt method for this, or do I have to give my own code?

Context

I am creating an original encryption program for fun, what should I do to set each character in Integer, which I can again in my encryption form Can manipulate

I typed four as an int using ASCI values ​​for all four, but then I read about Unicode online, and realized my mistake

Any help would be appreciated.

The Java programming language represents UTF-16 encoding using 16-bit Text in order of code units.

So it is enough:

  four characters = 'A'; Int code = letter; Println (code); According to   

Character literal can represent only the UTF-16 code unit (§ 3.1), that is, they \ u0000 to \ uffff. Supplementary characters are used either as a surrogate pair in a four sequence, or as an integer, on the basis of APIs.

No comments:

Post a Comment