I would rather suggest option 1 for medium-large projects, as you can benefit from using tools like Make quite a bit. But let's assume you don't want to.
SHELLEXEC will execute first time in third pass, so any INCLUDE of results in first/second pass will have nothing to include. You can wrap INCLUDE in `IF 3 == __PASS__`, but that will probably cause different issues with labels changing values in final pass.
So if you really want to convert it from inside the .asm source, lua script is the only option (as lua script can execute already in first pass). I haven't tried it myself, but I guess you can call `iconv` from lua, cache the result for following passes, and add the bytes from the result every pass, like Neo shows with `sj.add_byte(...)`.
Also another option is to edit your sources in cp1251 or dos-866 encoding, depends on your editor, but I'm using Kate, and it does remember the encoding I was using for particular file, so once I switch it from utf-8 to something else, I can edit whole source in different encoding.
So with utf-8 files - in the end you can have macro `db_cp1251` and call it like:
which will call the lua script, and receive the converted bytes.Код:db_cp1251 "some text"
Syntax like "db 'РУССКИЙ ТЕКСТ' | strConvert" is problematic, as pipe is already binary-or operator, etc... plus you would have to wait until somebody creates the fix, while you can add macro+lua script with current sjasmplus (maybe not "easily", I would need to google a bit for lua syntax to write it, but should be like hour-two of work, let me know if you can't figure it out)
well, I'm pretty sure the macro arguments were sensitive to the old bug too. If Alone coder writes source like this, and it works in older sjasmplus versions (1.07), it may be just one change in label/macro argument away from breaking. The 1.12.0+ will break consistently always.
I guess you don't find it funny.... fair enough. But I'm not sure how to resolve it... maybe disabling mid-word substitution globally by some option? That sounds actually quite OK, it can help with importing project from different assemblers, and it would be optional change. - I can imagine adding this.
I don't like the idea of doing the "correct" fix (for "v1.x"), switching mid-word substitutions to identifiers with underscore only, it makes lot of sense on syntax level, but would break other sources which depend on the current substitution. (if I ever create some "v2.x", I'm definitely going to change the substitution rules, current situation is not good ... but I have currently no plans/timeline to work on "v2.x", not any time soon)
- - - Updated - - -
But this works only if your current source encoding is cp1251? Lua doesn't do utf8->cp1251 conversion, right?? (too lazy to try)
But if you have source already in cp1251, you don't need to do anything, just use regular DB like `DB "Злые русские пишут злые русские тексты"` - it will work.






Ответить с цитированием
Размещение рекламы на форуме способствует его дальнейшему развитию 


