I'm currently developing an iOS app and I have a string encoded in ISO-8859-1 format: £2,970.98 (it's showing the pound symbol here but its actually: & # 1 6 3 ;). I'm trying to decode this string back to its original form using either JavaScript or Swift.
I've got a WKWebView in my app, so that's how I can run JavaScript code within the app if necessary.
So I've tried using the decodeURIComponent
function and other things in swift and in JavaScript, but it doesn't seem to work for ISO-8859-1 encoded strings.
Are there any other options for decoding this type of string in either JavaScript or Swift? Thank you!
Note that it doesn't auto translate it to a pound symbol in my app: