You are here: PSPad forum > English discussion forum > Re: How to a recover/restore a text from a wrong encoding?

Re: How to a recover/restore a text from a wrong encoding?

#1 How to a recover/restore a text from a wrong encoding?

Posted by: maki | Date: 2020-02-03 09:55 | IP: IP Logged

How to recover/restore text encoding?
I had a text file saved as CP-1250
but I accidentally saved it as CP-1251
and damaged e.g. Polish letters.

Example:
Radkуw Dolnoњl№skie

Correct:
Radków Dolnośląskie

њ
U+045A
UTF-8: 0xD1 0x9A
CYRILLIC SMALL LETTER NJE


U+2116
UTF-8: 0xE2 0x84 0x96
NUMERO SIGN

Edited 3 time(s). Last edit at 2020-02-03 10:01 by maki.

Options: Reply | Quote | Up ^


#2 Re: How to a recover/restore a text from a wrong encoding?

Posted by: pspad | Date: 2020-02-03 10:02 | IP: IP Logged

Open your file with encoding 1251, change encoding to 1250, save your file and reload (Ctrl+R).
In most cases will help to do same things in reverse order.

I tested with your line and got:
Radków Dolnośląskie

Options: Reply | Quote | Up ^


#3 Re: How to a recover/restore a text from a wrong encoding?

Posted by: maki | Date: 2020-02-03 10:22 | IP: IP Logged

I have to correct my question.

The text was saved as CP-1250
Next saved as CP-1251
Next saved as UTF-8

I made 2 mistakes.

So it's still bad.

Edited 1 time(s). Last edit at 2020-02-03 10:23 by maki.

Options: Reply | Quote | Up ^


#4 Re: How to a recover/restore a text from a wrong encoding?

Posted by: pspad | Date: 2020-02-03 10:24 | IP: IP Logged

open as UTF-8, save as 1251, reload
open are 1251, save as 1250, reload

Options: Reply | Quote | Up ^


#5 Re: How to a recover/restore a text from a wrong encoding?

Posted by: maki | Date: 2020-02-03 10:35 | IP: IP Logged

I still have damaged text.
My native system is CP-1250

Options: Reply | Quote | Up ^


#6 Re: How to a recover/restore a text from a wrong encoding?

Posted by: pspad | Date: 2020-02-03 10:58 | IP: IP Logged

Send me your file into support mail, I will try to recover it. If you didn't make any other savings that you wrote.

Edited 1 time(s). Last edit at 2020-02-03 10:58 by pspad.

Options: Reply | Quote | Up ^


#7 Re: How to a recover/restore a text from a wrong encoding?

Posted by: maki | Date: 2020-02-03 11:26 | IP: IP Logged

Sorry. I can not. Because these are the addresses of people.
UE General Data Protection Regulation, (GDPR)

Options: Reply | Quote | Up ^


#8 Re: How to a recover/restore a text from a wrong encoding?

Posted by: maki | Date: 2020-02-03 11:37 | IP: IP Logged

I need:

Character Encoder / Decoder Tool
Encoding / Decoding tool simulate character encoding problems and errors.

Encode with: windows-1251
Decode with: windows-1250

Edit:
Solved.

Edited 1 time(s). Last edit at 2020-02-03 11:42 by maki.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2020 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR