I encountered the same problem when working with previously running imacros macro files. I noticed that if I record a new macro, it works fine. The difference between the old macro and the newly recorded macro is that the new macro file is a UTF8 file with a byte prefix.
Augmenting @Thomas'answer: ANSI UTF8 - (BOM). UTF8 0xEF, 0xBB, 0xBF (. ).
, . PSPad Program Settings/Program Part 2 .