2

I made a research to find similar issues with wrong file name for chinese folders but without luck. API call listFiles call on file return list of files with unrecognized symbols in file path for chinese symbols. The interesting point is for some files chinese symbols are recognized, bit for others are not. Below is the sample:

http://pastebin.com/2esW80BJ

Do you have an idea why it happens? Behind the scene listFiles should use UTF-8 which should be properly handle Chinese chars. It does, but for some cases there are unrecognized symbols.

Gleichmut
  • 5,953
  • 5
  • 24
  • 32
  • Foreign languages should be deprecated. ;-) Anyway, how are Chinese characters encoded within the file system? – MC Emperor Jan 24 '17 at 10:19
  • It is Android, I assume everything is UTF-8 http://unix.stackexchange.com/questions/2089/what-charset-encoding-is-used-for-filenames-and-paths-on-linux – Gleichmut Jan 24 '17 at 10:32
  • However, if the filesystem is NTFS – I don't know whether that's possible, but I assume it is –, filenames are encoded as UTF-16, [see this post](http://stackoverflow.com/questions/2050973/what-encoding-are-filenames-in-ntfs-stored-as). Are you using an external storage card? – MC Emperor Jan 24 '17 at 11:03
  • No, there is not external storage. The device is lenovo pad2 – Gleichmut Jan 24 '17 at 11:26
  • How *should* those characters (���) look? – MC Emperor Jan 24 '17 at 12:09
  • That's the same word 6 申请文书示例 == 6 申请���书示例 – Gleichmut Jan 25 '17 at 02:15

1 Answers1

0

IN my case it was garbage as an input -- had different models and hadn't noticed the diff yesterday night

Gleichmut
  • 5,953
  • 5
  • 24
  • 32