You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today i noticed a special case where I was reading a JSON file with the FileReader. It returned null for some reason. When I made a small change to the file it worked. I debugged into it and found out that the FileReader has this READ_CHUNK_SIZE. It splits the file into chunks while reading. At some point it creates a string out if the byte buffer again. At this point the exception occures as the reader read just half of a special character into the buffer. Thats because special UTF-8 characters can be represented by more than one byte. In my case it was a degree sign "°".
The text was updated successfully, but these errors were encountered:
Bug Report
What is expected to happen?
The FileReader should read a file correctly.
What does actually happen?
FileReader returns null
Information
Today i noticed a special case where I was reading a JSON file with the FileReader. It returned null for some reason. When I made a small change to the file it worked. I debugged into it and found out that the FileReader has this READ_CHUNK_SIZE. It splits the file into chunks while reading. At some point it creates a string out if the byte buffer again. At this point the exception occures as the reader read just half of a special character into the buffer. Thats because special UTF-8 characters can be represented by more than one byte. In my case it was a degree sign "°".
The text was updated successfully, but these errors were encountered: