Android Question "UTF8" or "UTF-8"?

Alessandro71

Well-Known Member
Licensed User
Longtime User
some string subs (for example BytesToString) requires a charset specifications.
looking at examples, i've found both "UTF8" as well as "UTF-8".
which is the correct constant to be used?
are they equivalent or one of them is (or will be) deprecated?
 

emexes

Expert
Licensed User
Longtime User
AFAIK, both are accepted.

Probably true but I feel it's simpler and safer to work with the system rather than against it ie "UTF-8" :

1785856202909.png


Log output:
Waiting for debugger to connect...
Program started.
UTF-16
UTF-16BE
UTF-16LE
UTF-32
UTF-32BE
UTF-32LE
UTF-8
x-UTF-16LE-BOM
X-UTF-32BE-BOM
X-UTF-32LE-BOM
Program terminated (StartMessageLoop was not called).
 

Attachments

  • 1785855687830.png
    1785855687830.png
    11.3 KB · Views: 65
Last edited:
Upvote 0
Top