regex, which replace incorrect characters into Polish letters

English support forum

Moderators: white, Hacker, petermad, Stefan2

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 »

Once again (example)
1. Run Notepad++
2. "Format" - "Koduj w ANSI"
3. Paste your text

Code: Select all

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

        zdenerwowałam się,bo nawet tymbark się ze mnie nabija
4. "Format" - "Koduj W UTF-8" or "Koduj w UTF-8 (bez BOM)"
5. Now text is

Code: Select all

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

        zdenerwowałam się,bo nawet tymbark się ze mnie nabija
Does it work for you?
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 »

Works, but how to replace all (multiple) text files?
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 »

For multiple files probably best way is to use "Gżegżółka" ( http://www.gzegzolka.com ) as already Usher adviced you on the other thread -> https://www.ghisler.ch/board/viewtopic.php?p=349505#p349505
Did you tried it? It's very powerful tool.
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 could do all this in the powerful and favorite "EmEditor" tool, but I need to know how to set the encoding correctly to display correctly.
You can download the test version and give more details on how to set the encoding ???
https://i.postimg.cc/63GpGxCd/Screen-Shot-12-17-18-at-11-57-AM.jpg
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 »

This editor looks like dedicated for webmasters, so it's not a tool you are looking for, I suspect. The menu on your picture is a menu for Internet use of Unicode text. It is used to choose needed transport encoding or Unicode forms. It's not a codepage/charset conversion.

It's nothing about TC in your questions, go find better forum, please.
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 »

This is a better tool from Notepad++ and others.
It contains many more necessary options. A typical editor for everything and the fastest in performing activities even with huge databases, txt/csv files.
Unfortunately, I do not know how to set the encoding.
User avatar
tuska
Power Member
Power Member
Posts: 3758
Joined: 2007-05-21, 12:17 UTC

Re: regex, which replace incorrect characters into Polish letters

Post by *tuska »

2makinero

1    Run EmEditor [Version 18.4.0]
2    Save the text in the format "Central European (Windows) (1250, windows-1250)"
2.1 menu "File" - "Save As..."
2.2 Encoding: "Central European (Windows) (1250, windows-1250)"
2.3 button "Save", File - Close (Ctrl+W)
3    Open the file in the format "UTF-8"
3.1 click on button "Open (Strg+O)"
3.2 choose "Encoding:" --> UTF-8, Detect: ✅ UTF-8
3.3 Enter the path and file name, then press button "Open"
3.4 The text was converted exactly as shown by Gral in the image
3.5 "UTF-8 without Signature" is displayed in the status bar of EmEditor.

With EmEditor several files can be converted at once [theoretically]:
2.1 menu "File" - "Save All with Encoding..."
Unfortunately I didn't manage to have all files in the format "Central European (Windows) (1250, windows-1250)"
to be saved. This worked for me only for every single file as described above. But maybe you'll have more luck.

To open multiple files in EmEditor at the same time, you can use the button below:
(The path to EmEditor.exe has to be adjusted).

Code: Select all

TOTALCMD#BAR#DATA
"%COMMANDER_PATH%\Tools\EmEditor-portabel\EmEditorProfessional_64-bit_portabel\EmEditor.exe"
%P%S
%COMMANDER_PATH%\Tools\EmEditor-portabel\EmEditorProfessional_64-bit_portabel\EmEditor.exe,1
EmEditor Professional (portabel) - 64-bit |Several marked files (e.g. .txt) can be opened at the same time! |Clicking the button opens the marked files or those with focus on file(!) or an "Open" window appears...

%COMMANDER_PATH%\Tools\EmEditor-portabel\EmEditorProfessional_64-bit_portabel\
0
-1
Post Reply