java - Intellij cannot recognize UTF-8 characters -


i set configurations utf-8, after result of rsa encryption cannot recognized intellij.

here settings:

enter image description here

enter image description here

and here actual encrypted text: result

 getrsa().init(cipher.encrypt_mode, readpublickey());  return new string(getrsa().dofinal(token.getbytes("utf-8"))); 

i set in pom.xml

<project.build.sourceencoding>utf-8</project.build.sourceencoding> 

and command line param:

-dfile.encoding=utf-8 

what can reason?

you're trying treat arbitrary binary data if utf-8-encoded text. it's not. it's arbitrary binary data. you're doing trying represent image or music file text - isn't text...

you should use base64 convert string instead (e.g. this public domain library). see marc gravell's blog post on io issues more background on why required.

note not intellij problem - it's problem approach you're taking data.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -