-
Notifications
You must be signed in to change notification settings - Fork 12
Check FileMustStartWithTextEncoding
github-actions[bot] edited this page Sep 8, 2026
·
2 revisions
Magik determines a source file's character encoding from a #% text_encoding = ... comment on its first line. When it is missing, the file is read using the session's default encoding, which depends on the locale and can mangle non-ASCII characters such as umlauts. Declaring the encoding on the first line makes the file decode consistently everywhere. Note that the comment is only honoured on the very first line.
_package user
_method a.foo() _endmethod
#% text_encoding = utf8
_package user
_method a.foo() _endmethod
Note
This page is generated. Any changes made to this page through the wiki will be lost in the future.