Typical text encoding and EOL behavior on mobile devices
Posted
by
Dan W
on Stack Overflow
See other posts from Stack Overflow
or by Dan W
Published on 2012-10-15T22:05:20Z
Indexed on
2012/10/15
23:02 UTC
Read the original article
Hit count: 264
Typical things to worry about when dealing with text are the BOM/signature, encoding, and the end of line (EOL) char/chars.
I know that Windows often favours \r\n (CR+LF) and Mac/Linux favours \n (LF), but how about popular mobile devices such as the iPhone and Android? Do typical apps on those platforms favour one or the other (or maybe even \r for iOS)? I'll supply both types to the user just in case, but I'd like to choose one as default.
Also, which text encodings are mobiles most likely to use - UTF-8, iso-8859-1, Windows 1252 (or other default codepage) or maybe even UTF-16? And if they use UTF-8/16, are they likely to need (or require not having) a BOM/signature? What is the typical behavior here? Once again, I'll supply a range of encodings to the user just in case, but I'd like to prioritize or use certain encodings as default if it's appropriate.
© Stack Overflow or respective owner