which unicode should be used UTF-8 and UTF-16 when deal with accented characters in java response to Ajax -
first of all, main difference between utf-8 , utf-16,
and when dealing accented character in ajax java, facing issue
is in question [https://stackoverflow.com/questions/30227083/java-response-to-ajax-with-accented-characters-garbled][1]
many if can me this.
i suggest reading utf-8 article on wikipedia, it's excellent.
>what main difference between utf-8 , utf-16
utf-8 variable width , can handle characters in unicode, first 128 characters of utf-8 latin-1 identical 7-bit ascii , therefore 7-bit ascii proper subset of utf-8 every character 1 byte has advantage old character handling code work seamlessly utf-8 content if know it's never going other latin-1.
for handling code pages outside of latin-1 (your accented characters , other languages) utf-8 use more 1 byte per character.
utf-16 older standard can handle unicode characters doesn't have backwards compatibility ascii because it's @ least double byte. therefore utf-8 more efficient utf-16 handling ascii. (it's more efficient several other character sets, gets complicated.)
my advice use utf-8 unless forced use utf-16 libraries. modern languages make converting between encodings straight forward, choose 1 useful , easy support in long run , experience, particularly java has been that's utf-8.
Comments
Post a Comment