Need to Always/Permanently highlight non-ASCII characters



  • I work with a process that breaks if any of the input files have non-ASCII characters in them. It would help tremendously if there was a feature that I could enable that would automatically highlight any such characters whenever I open one of the files. I don’t want to have to manually search for [^\x00-\x7F]+. That’s a pain to have to manually type (let alone remember) every time I open a file.

    Any way to do this?

    Thanks in advance!



  • @bisdavid

    with a scripting plugin like pythonscript or luascript etc… you can register a callback
    for BUFFERACTIVATED notification.
    Whenever you open a new document or switch between documents the callback gets called and you could run a check if [^\x00-\x7F]+ is found.
    Sounds interesting for you?



  • @bisdavid If all that is done is to “automatically highlight any such characters whenever I open”, aren’t you still going to have to “search”…because what if said characters aren’t in the current viewable area; you won’t know if a file contains any “bad” characters or not?


Log in to reply