
Сообщение от
0xDEAD
Ясно, значит, директива ENCODING не нужна.
Я ж не знал.
sjasmplus binary doesn't contain all possible encodings and locales (and that's why it is ~300-500kB executable, not 15MB
).
the `ENCODING` directive is some one-way hack to do 866->1251 conversion or something like that, I'm NOT familiar with these encodings, and it's year+ since I was writing tests for it, so I'm not 100% sure if it has also some other way, but I'm 100% sure it has no idea what UTF8 is.
If you want to edit sources in UTF8, add to your build process conversion by some tool which knows all encodings, for example I did shorten your example to UTF8:
Код:
db "\N...или по-русски"
and saved that as "test_utf8.asm"
Then I can in linux do with `iconv` this:
Код:
$ iconv -f utf8 -t cp1251 test_utf8.asm | sjasmplus - --msg=lst
# file opened: console_input
1 0000 0A 2E 2E 2E db "\N...��� ��-������"
1 0004 E8 EB E8 20
1 0008 EF EE 2D F0
1 000C F3 F1 F1 EA
1 0010 E8
2 0011
# file closed: console_input
(in my own project I would probably have special extension for all files with DB needing conversion like ".utf8.asm" and have implicit Makefile rule to convert those with iconv to ".1251.asm" and include from regular source those "something.1251.asm".
So then the build process would refresh them from the utf8 sources as needed, but sjasmplus would include the 1251 encoded ones ... but whatever works for you).
Why your VS/VSC doesn't remember encoding of project per file is kinda LOL, but I can't help with that, I don't use VS or VSC (in my favourite editor Kate I can open unknown file and it will try to auto-detect correct encoding, and if I manually switch it to correct encoding, it keeps the info in cache of recently opened files, so technically it will open with correct encoding forever on my local machine).