⚠️ Error Message
Invalid byte 2 of 2-byte UTF-8 sequence
📌 Causes
This error occurs because:
➡️ Workflow files (*.csd) do not use UTF-8 encoding
HGrid247 can only read files with UTF-8 encoding , so if the file:
- ANSI
- UTF-16
- or other encoding
➡️ Then this error will appear when compiling or loading the workflow
🧠 Simple Explanation
UTF-8 is the encoding standard for reading text.
If the file is created/edited with another encoding:
➡️ The bytes read become “invalid”
That's why the error appears:
Invalid byte ...
🎯 Solution
🔧 Method 1: Using Notepad++ (Recommended)
Steps:
- Open the file .csd in Notepad++
- Click the menu:
Encoding
- Choose:
Convert to UTF-8
- Save file (Ctrl + S)
🔧 Method 2: Using Another Editor
If using another editor:
Make sure when saving:
Encoding = UTF-8
⚠️ Things That Happen Often
- Files copied from another OS (Linux ↔ Windows)
- Files are edited using Excel / non-text editors
- Encoding changes automatically without realizing it