Note that there are some explanatory texts on larger screens.

plurals
  1. POFile.listFiles() with file names with multibyte characters causes dalvik abend
    primarykey
    data
    text
    <p>I've encountered a problem with File.listFiles() with certain file names. In case a directory contains a file with multibyte characters in its name such as Cyrilic or Japanese so that the total length of the file name (not the entire path) is more than 255 bytes, the method File.listFiles() causes delvik to abend with the following error written in LogCat:</p> <pre><code>07-14 20:06:53.758: A//system/bin/app_process(18698): stack corruption detected: aborted </code></pre> <p>Here is an example file name which causes this error:</p> <pre><code>Аверинцев Сергей Сергеевич - Проповеди. Псалмы, книга Иова (в переводе С.С. Аверинцева). Духовные стихи [Аверинцев С.С., 2004, 128-192 kbps] -- RuTracker.org (ex torrents.ru).url </code></pre> <p>I've tried rewriting the entire code using NDK but the function scandir returns only a 255 bytes long name. It does not abend but the file name is truncated. It truncates the file listed above to:</p> <pre><code>Аверинцев Сергей Сергеевич - Проповеди. Псалмы, книга Иова (в переводе С.С. Аверинцева). Духовные стихи [Аверинцев С.С., 2004, 128-192 kbps] -- RuTracker.org (ex torren </code></pre> <p>I tried using wchar equivalent functions such as _wopendir, _wreaddir and the likes but I'm unable to compile them with ndk-build. I thought about using Crystax NDK (<a href="http://www.crystax.net/en/android/ndk" rel="nofollow">http://www.crystax.net/en/android/ndk</a>) which is supposed to support wchar but didn't manage doing it since there is no documentation whatsoever.</p> <p>Ideas anybody?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload