java - Create a char from a string that contains the utf code -


I am trying to create four from the urf code. I am reading this code with a file which is a map of the characters All the characters are specified by their UTF code.

0020 Space
0021 Exclamation Mark
0022 Quote Mark




Read the code from the file After this, I end up with this code in this string. How can I change this code (stering) in a four? The codes are stored in hexadecimal, so I think you want it:

 

String code = "0021"; Four c = (four) integer PRIIENT (code, 16); System.out.println ("Code:" + Code + "Character:" + c);

I think that none of your character codes are worth more than the maximum value that can be stored in a four, that is, the characters in it. Because your data format seems to be tickle to the maximum length of maximum 4 hexadecimal digits, I think all the characters you need to consider are actually in BMP.

If it is not, you will need a different solution.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -