开发者

How to test UTF-8 strings in Java

开发者 https://www.devze.com 2022-12-27 12:33 出处:网络
I have to tes开发者_如何学Got a web app and its API for UTF-8 strings. Webapp has a text field and its API has corresponding getter method, I have to make sure UTF-8 will work, how do I do that?You

I have to tes开发者_如何学Got a web app and its API for UTF-8 strings.

Webapp has a text field and its API has corresponding getter method, I have to make sure UTF-8 will work, how do I do that?


You could put in characters outside of the standard ASCII set - i.e. anything above 127 or 255 in the character levels and see that they come out the other end of the API correctly.

Here is a character map generator:

http://dev.networkerror.org/utf8/


aperkins gave a good suggestion. Note that depending on your IDE, you may need to set the your editor to UTF-8 and set the java compiler option -encoding utf-8

0

精彩评论

暂无评论...
验证码 换一张
取 消