I have a .DAT
file with Hebrew text, I want to decode the data. When trying to decode using text editors on Mac (BBEdit, Sublime or TextEdit) the Hebrew text becomes gibberish.
The file originally was in this format:
1081 310120 310120 197700 $ ‰˜…ˆ‰” .” .–…„ 01/20 01
And i've managed to change it to this format:
1081 310120 310120 197700 $ èâòÖàâî .î .ñÖÑ 01/20 01
When trying an online decoder: http://www.online-decoder.com/he it works and decode by default from macCroatian
to IBM862
, but there is no such encoding in Swift.
I found a library which I think that can help me do that, but can't add it to my project: https://www.example-code.com/swift3/load_text_file_using_code_page.asp
What is the best way to decode the .DAT file in Swift?