7

We download many UTF-8 encoded .txt files.

Download list

Later in the e.g., Northwoods, far from the Internet, we find they are unreadable.

latin1 wrong charset

Yes, we could simply open them in a different app, but we wish to keep using Chrome. No, the files don't contain byte order marks. Yes, there is no problem on Android 8, but things are much different on Android 13. As we observe, the content:// URI does not pass character set information, so the browser can only assume it is latin1.

How can I view downloaded .txt files as UTF-8 in Chrome on Android 13?

0

1 Answer 1

12

It turns out on Android 13, in Chrome, one must manually navigate to

file:///sdcard/
and then via the directory tree to select the file.

Note, that the final "/" is important. Without it, you will still trigger a web search (G icon) instead of being allowed to access the file system.

Before slash

After slash

Indeed, you might need to type this in letter-by-letter: f i l e : / / / s d c a r d / as simply pasting might not bypass the web search.

If successful, certainly do save it as a bookmark as I have.

In fact, a better way is to go into your bookmarks and pick an old unused one and then edit the contents to put the file:///sdcard/ right in there and that ought to give you a bookmark that won't get hijacked to web search. If you don't have an old unused one then make a junk one.

sdcard directory

Download directory

Voila, mojibake gone!:

Final cleartext

Images taken on Samsung Galaxy, Chrome Dev 113.

3
  • 4
    Maybe it's possible to copy-paste the link, delete the last character, and type the trailing slash manually.
    – pts
    Apr 3, 2023 at 21:51
  • 1
    Or go through the internal pages, such as chrome://omnibox to disable the behavior, etc.
    – Arctiic
    May 13, 2023 at 16:30
  • 1
    This works for viewing downloaded .txt files (as stated in the question), but I wanted to view other (non-downloaded) .txt files in Chrome (or Kiwi, in my case). This doesn't work for that, since other folders are not accessible now because of Scoped Storage. At the moment, I open them from MiXplorer, so they have content:// URIs, with the wrong encoding, like in your case. I can't access those files even if I move them to the Download folder, I guess this is because they are not in the MediaStore.Downloads table Aug 24, 2023 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .