0

I need to finder script on the windows command line. I will call the command in a PHP exec() function.

I am using findstr command. But this command not working on Turkish Character. Like this

findstr /s /r /n /i /C:Türkçe C:\wamp\www\xxx\xxx\xxx\xxx\text\5dc75a9d6083a89858fc4557ff3a8969aec718d4.txt

This command response nothing. I checked with Notepad++, 5dc75a9d6083a89858fc4557ff3a8969aec718d4.txt file has UTF-8 and Türkçe string. I checked chcp active code page 857. 857 is Turkish code.

When I was the call to findstr not Turkish character command responseenter image description here When I was check encoding with notepad ++, the file is utf8 encoding.
enter image description here

Will you help me with this problem?

Thank you.

olgundutkan
  • 406
  • 2
  • 17
  • Possible duplicate of [What are the undocumented features and limitations of the Windows FINDSTR command?](https://stackoverflow.com/questions/8844868/what-are-the-undocumented-features-and-limitations-of-the-windows-findstr-comman) – JosefZ Dec 08 '17 at 19:04
  • @JosefZ I try this. But not working on my code. Because I didn't see Turkish characters when I was call `type C:\wamp\www\xxx\xxx\xxx\xxx\text\5dc75a9d6083a89858fc4557ff3a8969aec718d4.txt`. – olgundutkan Dec 11 '17 at 08:40
  • 1
    If the file contains UTF-8, the CP857 representation of the search string will obviously not be present in the file. The CP857 representation of the UTF-8 version of this string would appear to be `T├╝rk├ğe` (sic). – tripleee Dec 11 '17 at 08:51
  • My search string converts to UTF-8 string but not working again. – olgundutkan Dec 11 '17 at 11:33

0 Answers0