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?
 
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


[CODE lang="html" title="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).
[/CODE]
 

Attachments

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