java - Intellij cannot recognize UTF-8 characters -
i set configurations utf-8, after result of rsa encryption cannot recognized intellij.
here settings:


and here actual encrypted text: 
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
Post a Comment