Menu

#46 D7 Grep Search Error with Unicode Chars in Directory

As_Designed
closed-wont-fix
None
2
2017-07-17
2017-07-09
Erik Berry
No

IDE: D7
Version: 1.3.8.48
A user reports the Grep Search error "The search directory XYZ does not exist." when searching inside directories with unicide characters depicted in the screenshots (example contains "Martin Djernæs" in the directory name).

2 Attachments

Discussion

  • Thomas Mueller

    Thomas Mueller - 2017-07-16
    1. If you select a directory containing unicode characters for directory search, it will show up with ??? in the dialog. That's simply due to the controls not being unicode aware. DirectoryExists will fail due to the ??? characters in GX_GrepSearch, line 374. I doubt that I can do much about it short of replacing the edit control, possibly with a TSynEdit control descendant.
    2. If you select a parent directory, the same happens at a different position in GX_GrepBackend, line 572. This could probably be fixed by calling FindFirstFileW instead of FindFirstFileA.
     
  • Thomas Mueller

    Thomas Mueller - 2017-07-16

    The error also occurs in Delphi 2007 (and therefore probably in all pre-Unicode versions).

     
  • Thomas Mueller

    Thomas Mueller - 2017-07-16

    I got it to work partially in Delphi 2007. The display for Unicode file names is still wrong because the controls just don't support it, but the functionality is there. No such luck with Delphi 7 though, because many of the string functions don't work on WideString yet. I don't think it's worth it. Either use a Windows where the Ansi functions work with your strings, or use a Delphi version that supports Unicode.

     
  • Thomas Mueller

    Thomas Mueller - 2017-07-16
    • status: open --> closed-wont-fix
    • assigned_to: Thomas Mueller
    • Group: New --> As_Designed
     
  • Thomas Mueller

    Thomas Mueller - 2017-07-16

    So, now I have to consider whether I want to keep the changes for Delphi 2007. They might break other code.

     
  • Thomas Mueller

    Thomas Mueller - 2017-07-16

    No, won't do it. The IDE, VCL and RTL are not unicode aware. Too much effort for too little gain.

     
  • limelect

    limelect - 2017-07-17

    What i did is every time Gexpert fails RENAME the directory

     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.
Try Free →