lee321987 Posted March 1, 2020 Share Posted March 1, 2020 Has anyone else noticed this? EXAMPLE: In this post: If you copy-paste his code, there are bunch of 0x00 characters littered throughout the code, and SciTE throws an error "illegal character". I wish I had another example, but I can't remember the last time this happened. But it has happened before. Does anyone have a work-around for this? To get that code working, I pasted the code into a hex editor, and replaced all 0x00 with nothing. Link to comment Share on other sites More sharing options...
Earthshine Posted March 1, 2020 Share Posted March 1, 2020 (edited) In autoIT editor you can turn on viewing special characters. Find them that way Edited March 1, 2020 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
lee321987 Posted March 1, 2020 Author Share Posted March 1, 2020 Two things: 1) How do I do that in SciTE? In Notepad++ there is a "show all characters" option, but I can't find one in SciTE. 2) I don't know what changed, but the forum post I referenced in the first post now copies correctly...???? (no inserted 0x00 chars) Link to comment Share on other sites More sharing options...
Subz Posted March 1, 2020 Share Posted March 1, 2020 Yes, noticed it occurred after a forum upgrade some time ago. Normally if you run the code in Scite, the console output, will tell you where the illegal character is, I then just place the cursor where the error is and either press backspace or delete, unfortunately you can't see the character within the editor and even with "Show all Characters" in Notepad++. Example, the code abberration quotes includes ï at the end of the second line (see Figure 1), but doesn't appear in the original code by Malkey. If you post the code into the forum you will see a red dot where the illegal characters are (see Figure 2). Figure 1 Figure 2 Link to comment Share on other sites More sharing options...
argumentum Posted March 1, 2020 Share Posted March 1, 2020 4 hours ago, lee321987 said: I pasted the code into a hex editor, and replaced all 0x00 with nothing ClipPut(StringReplace(ClipGet(), Chr(0), "")) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
mikell Posted March 1, 2020 Share Posted March 1, 2020 StringRegExpReplace(ClipGet(), '[\x{0000}\x{FEFF}\x{200B}-\x{200D}]', "") \x{0000} NULL \x{FEFF} ZERO WIDTH NO-BREAK SPACE \x{200B} ZERO WIDTH SPACE \x{200C} ZERO WIDTH NON-JOINER \x{200D} ZERO WIDTH JOINER argumentum 1 Link to comment Share on other sites More sharing options...
Nine Posted March 1, 2020 Share Posted March 1, 2020 Another option I personally prefer. You press Ctrl-H, you check Regular Expression, in Find What, you enter [\xEF\xBB\xBF], and you click Replace All. Gone are those undesired characters. Those chars are usually the ones I have... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
argumentum Posted March 1, 2020 Share Posted March 1, 2020 I'm so lazy... . It's the driving force of my coding #AutoIt3Wrapper_Icon=iconfinder_470-Clipboard_2124487.ico ClipPut(StringRegExpReplace(ClipGet(), '[\x{0000}\x{FEFF}\x{200B}-\x{200D}]', "")) ;~ \x{0000} NULL ;~ \x{FEFF} ZERO WIDTH NO-BREAK SPACE ;~ \x{200B} ZERO WIDTH SPACE ;~ \x{200C} ZERO WIDTH NON-JOINER ;~ \x{200D} ZERO WIDTH JOINER ..should it be moved to examples ? iconfinder_470-Clipboard_2124487.ico Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now