Since Java holds characters internally in UTF-16, what if you need to output in a certain encoding that includes characters that are not in unicode at all?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Java can only handle characters which are present in Unicode, basically. Text outside the BMP (i.e. above U+FFFF) is encoded as surrogate pairs (as each
charis a UTF-16 code unit)… but if you want characters which aren’t in Unicode at all, you’re on your own – you could probably find some area of Unicode which is reserved for private use, and map the characters there… but you may well have “fun” in all kinds of odd ways.Do you definitely need to handle characters which aren’t in Unicode? I thought it covered almost everything these days…