regex, which replace incorrect characters into Polish letters

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
makinero
Senior Member
Senior Member
Posts: 268
Joined: 2013-10-26, 10:05 UTC

regex, which replace incorrect characters into Polish letters

Post by *makinero »

regex, which replace incorrect characters into Polish letters. please help!



"Ä…"=>"ą"
"ć"=>"ć"
"Ä™"=>"ę"
"ó"=>"ó"
"Å‚"=>"ł"
"Å„"=>"ń"
"Å›"=>"ś"
"ż"=>"ż"
"ź"=>"ź"
"Å�"=>"Ł"
"Ó"=>"Ó"
"ü"=>"ü"
"ä"=>"ä"
"Å‘"=>"ö"
"Å�"=>"Ö"
''Å»''=>''Ż''
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: regex, which replace incorrect characters into Polish letters

Post by *ghisler(Author) »

Just use search and replace! General syntax:
Search for: characters1|characters2|characters3
Replace with: new1|new2|new3
Author of Total Commander
https://www.ghisler.com
User avatar
makinero
Senior Member
Senior Member
Posts: 268
Joined: 2013-10-26, 10:05 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *makinero »

I do not understand, it looks tangled
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *Gral »

This is UTF8 to Win1250 code page conversion.
Use Translit2 content plugin with table

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="UTF8_2_WIN1250.TTB"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="UTF8_2_WIN1250.TTB"

W1N5bWJvbHNdDQrEhD2lDQrEhj3GDQrEmD3KDQrFgT2jDQrFgz3RDQrDkz3TDQrFmj2MDQrFuT2P
DQrFuz2vDQrEhT25DQrEhz3mDQrEmT3qDQrFgj2zDQrFhD3xDQrDsz3zDQrFmz2cDQrFuj2fDQrF
vD2/DQo=


Yes, 18 signs, you missing some letters.
User avatar
makinero
Senior Member
Senior Member
Posts: 268
Joined: 2013-10-26, 10:05 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *makinero »

@gRAL = I have no idea what you are talking about, what it is and how to use it. Please write only regex, and this will change in 1 second.
Or how to convert HTML to a text file (descriptions only). 100% remove HTML and do not damage the text.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6487
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: regex, which replace incorrect characters into Polish letters

Post by *Horst.Epp »

Don't feed the troll
He never acceptes any answer, always has better tools, never describes what the real problem is.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *Usher »

Gral wrote: 2018-12-10, 15:48 UTCThis is UTF8 to Win1250 code page conversion.
Use Translit2 content plugin with table
How do you want to use _content_ plugin to convert file names?
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *Gral »

First of all - you don't even know Polish alphabet - ü ä ö Ö - are NOT Polish letters.
So, you also miss 6 real Polish letters.
There's no need to use regex - traditional search and replace is needed.
Just define it yourself.
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *Gral »

2 Usher
Magic...

use
[=?] Plugin
[=?] Wtyczka
button...
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *Usher »

Gral wrote: 2018-12-10, 17:58 UTC First of all - you don't even know Polish alphabet - ü ä ö Ö - are NOT Polish letters.
I suppose that @makinero improperly pasted copied text, as you also did, he just didn't fix his message. Explanations are more hepful than accusations.
Gral wrote: 2018-12-10, 18:01 UTC 2 Usher
Magic...
I prefer knowledge – it's power.

Your laconic posts in this topic seem to be completely unusable for newbies and somehow enigmatic even for advanced users.
It will be really great magic if you provide more details when answering, please.
Links to older topics in proper subforums will be also very helpful.
Thanks in advance for your Christmas gift.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
makinero
Senior Member
Senior Member
Posts: 268
Joined: 2013-10-26, 10:05 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *makinero »

I tried to change the encoding in the Encoding option, but the text remains the same, i.e. unchanged.

Code: Select all

 Kupiłam tymbarka,a pod nakrętką napis ‚On Cię kocha’

        zdenerwowałam się,bo nawet tymbark się ze mnie nabija
’, Â, � etc... How to fix strange encoding characters in text.

The encoding probably can not be changed because the text already contains damaged letters during the conversion with another HTMLtoTXT program


Perhaps this can be solved quickly, extract all descriptions from the TAG </a>TEXT</p> or <p>TEXT</p>

Code: Select all

</a>Chcialam Ci wiele dac od siebie.           Nie chcialam w zamian zbyt wiele. Chcialam milosci ktora obiecales.        Niczego jednak nie dales.                       Chcialam zebys byl przyjacielem          Moc porozmawiac z Toba w kazdej chwili.                                                         Chcialam zebysmy sie rozumieli.               W zgodzie ze soba zyli.                           Caly czas mam Ciebie w sercu.             Nie moge sie pozbyc mysli o Tobie.     Pokochalam i tak juz zostalo,                Chociaz nie nalerzysz juz do mnie.</p>

This regex, it is not correct, must be edited.

(?<=<p>)[^\\\[\]\{\}]*?(?=(</p>|<p>))
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *Gral »

What you need is good text editor e.g. Notepad++
Look here http://gral.y0.pl/tc/nowy1.htm
Paste your text to Notepad++, save text as ANSI (look at statusbar), reopen as a UTF-8, done.
User avatar
makinero
Senior Member
Senior Member
Posts: 268
Joined: 2013-10-26, 10:05 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *makinero »

User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *Gral »

OMG
Do you at least read menu entries? What do you think means "Koduj w ANSI" on your second screen?
User avatar
makinero
Senior Member
Senior Member
Posts: 268
Joined: 2013-10-26, 10:05 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *makinero »

I have set up different coding, the letters are still damaged. What to do next?
Post Reply