Am 27.08.22 um 08:55 schrieb David Chmelik:
What is the plain-text (.TXT) file format specification on Android?
UNIX & GNU/Linux, Apple, DOS all have .TXT formats that differ where
carriage-return and line-break (new-line) are placed (so often display
wrongly on other operating systems)... where or what are specifications
for Android?
I doubt there is a formal specification, as Android users are not even supposed to interact with "files".
But Android is Linux-based and on Linux, the convention for text files
is using LF as line separator and UTF8 encoding. Best practice for a programmer would be to accept all of CR,CRLF,LF for input and generate
the OS's convention (here: LF) for output.
Hergen Lehmann wrote:
Am 27.08.22 um 08:55 schrieb David Chmelik:
What is the plain-text (.TXT) file format specification on Android?
UNIX & GNU/Linux, Apple, DOS all have .TXT formats that differ where
carriage-return and line-break (new-line) are placed (so often display
wrongly on other operating systems)... where or what are specifications
for Android?
I doubt there is a formal specification, as Android users are not even
supposed to interact with "files".
But Android is Linux-based and on Linux, the convention for text files
is using LF as line separator and UTF8 encoding. Best practice for a
programmer would be to accept all of CR,CRLF,LF for input and generate
the OS's convention (here: LF) for output.
If I want to edit a text file, what I normally do is put the file in my
text folder on my sdcard and then name it 'foo.txt' and then when I tap on
it from the file manager it opens up in my default text editor.
Usually I make a shortcut to that file if it's something I need frequently, like a shopping list or an ad hoc address or impromptu phone number.
I then put that desktop shortcut in the appropriate folder.
Since I mount all of Android onto Windows as a drive letter over Wi-Fi, the same Android text files are editable on Windows vim also, despite the platform CR/LF differences.
<https://i.postimg.cc/BvJdKWzt/webdav06.jpg> Both sdcards mounted
Windows vim even says at the bottom that it's using [unix] CR/LF formats. Perfectly compatible.
Same the other way around.
Perfectly compatible.
Notice how compatible everything is _except_ Apple's idiotic walled garden.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 66:04:54 |
Calls: | 6,712 |
Files: | 12,244 |
Messages: | 5,356,309 |