G
G
genesis11112019-09-23 15:25:56
cmd/bat
genesis1111, 2019-09-23 15:25:56

Bat file how to replace a string in a php file while keeping Russian letters?

Hello!
I have a php (UTF8) file. It needs to replace foo with too.
I make the following code in a bat file

powershell -Command "(gc index.php) -replace '{PARARAM}', 'bar' | Out-File index1.php"

foo changes to too, but at the same time all Russian letters fly (определяем)
I played with encodings for 2 hours - so far without results.
If there is an easier way without (powershell) - I will be glad

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
ThunderCat, 2019-09-23
@genezis1111

if there are php files, it is logical that puff is installed, run the puff script, specify the default utf8 codepage in the settings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question