0

The text file was written in Arabic originally, then when I moved the file to an external SSD, then to another device it turned gibberish.(like this):

---áÇÊÊÓÑÚ ÈÇí ÔÆ
---ÇáÎÑæÌ ãä ÇáãÔÇßá ÈÐßÇÁ
---ÝßÑ ÈÐßÇÁ

I tried my best changing the encoding but nothing happened.

Is there a way to get it back?

asked Jun 9, 2024 at 0:52

1 Answer 1

2

It depends on your operating system. This looks like it was original encoded in CP1256 and then interpreted as Latin-1. On a unix-like system, you can use iconv to convert it:

% echo 'áÇÊÊÓÑÚ ÈÇí ÔÆ' | iconv -t latin1 | iconv -f cp1256
لاتتسرع باي شئ

This takes the UTF-8 (which is what you pasted here) and converts it to Latin-1. It then reinterprets it as if it were CP1256 and outputs it as UTF-8.

It is also possible that your old system was configured in CP1256 and your new system is configured as Latin-1. If that's the case, you can likely reconfigure your new system to read in CP1256. (How to do that completely depends on your setup, and may not be possible for all systems.)

answered Jun 9, 2024 at 1:06
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.