Windows – Weird characters (´╗┐) at the start of a batch file

I am working with batch files in Windows, using both Notepad, and Notepad++. When I run the batch files, which all start with @echo off, I see the first line (when running on two separate machines) reading ´╗┐@echo off, and then all the REM lines below it appear as well.

I have tried changing the encoding in Notepad++, but it claims they are already at UTF-8 encoding, which appears to be correct.

What do I need to do to get these files to run properly?

Solution:

It looks like the DOS ASCII encoding of the Byte Order Mark for UTF-8 (0xEF 0xBB 0xBF):http://en.wikipedia.org/wiki/Byte_order_mark

In Notepad++ try encoding it as “UTF-8 Without BOM” or as plain ASCII. I think the use of BOM for UTF-8 is discouraged for this reason, it’s not exactly backwards compatible with ASCII.

💠

🔵 Best-selling hard drives, USB flash drives & SSDs everyone's buying.

Fast, reliable, and on sale now. Thousands pick these weekly — don't miss Amazon's lowest storage prices.

Top 10 Bestsellers
🏆 4.7★+ Reviews
📦 Prime Shipping
👉 See today's best-selling Data storage on Amazon.com HDD · USB Flash Drives · SSD · External Drives
🛒
✅ Updated hourly — Amazon real-time ranking 🔥 Limited stock deals 🔗 Affiliate
⭐ Click to see complete best-selling list ⭐
Scroll to Top