Answer the question
In order to leave comments, you need to log in
How to get the same file content in java that js returns?
Using the FileReader() and readAsDataURL(file) methods in javascript, I get the contents of a file like this
. In Java/android, I use a ByteArrayOutputStream and get similar content, but most of the characters are represented as placeholders �
Why is that? How to get the same string in Java as in js?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
Perhaps java receives exactly the same bytes, but different consoles display characters differently. Suppose in your screenshot in js the console replaces incomprehensible characters with spaces, and in the second console, that is, java, it is replaced with question marks
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question