flat assembler
Message board for the users of flat assembler.
Index
> Windows > UNICODE |
Author |
|
Borsuc 22 Jul 2006, 21:27
Do you mean using Unicode in source code or in released program?
|
|||
22 Jul 2006, 21:27 |
|
kohlrak 23 Jul 2006, 01:47
Both would be nice. lol I don't use the GUI to compile. I use commandline, i attributed asm with the commandline so i only have to double click to compile. Anyway, both would be nice. lol
|
|||
23 Jul 2006, 01:47 |
|
wht36 23 Jul 2006, 07:36
Put double quotes around your kana string. It should work fine then.
|
|||
23 Jul 2006, 07:36 |
|
donkey7 23 Jul 2006, 09:32
use du instead of db for defining strings plus change include file from 'win32a.inc' to 'win32w.inc'. this would allow to use unicode in programs. afaik source code can be written only using 8- bit alphabet.
|
|||
23 Jul 2006, 09:32 |
|
Tomasz Grysztar 23 Jul 2006, 11:38
At least UTF-8 in source code is currently supported (but you need a capable editor for this, fasmw is 8-bit only, and Notepad adds some unwanted header to the beginning of text files saved in UTF-8 ), see the sample in attachment.
You can also, of course, write the character codes directly, like: Code: du 'Unicode character: ',20ACh,0 If this didn't work for you with values higher than 255 then you've probably used "db" instead of "du". And, as already mentioned, to work on unicode strings instead of 8-bit ones you need to use 'win32w' includes instead of 'win32a'. However all the texts in resources (dialogs, for example) are always in unicode anyway.
|
|||||||||||
23 Jul 2006, 11:38 |
|
kohlrak 23 Jul 2006, 14:03
i do that and all the sudden ".code" in the hello example is considered wrong...
BUT, a little screwing around and it worked... for chars... Quote: F:\testinggrounds\ASM>hello.asm Oh well, at least i can use kana via the individual values used (i can't even do that in C++ with the current support i have for that) so i'm ratherp leased to use something other than a bunch of "boxes"/"Rs" in my programs. lol That is UTF-8bit though... hm... Like i said, i'm still pleased i can use some form of unicode at this point. Thank you all for your input, i'm going to work on fixing the compiler to see the  correctly. That's the beauty of assembly, you can do that. lol |
|||
23 Jul 2006, 14:03 |
|
Tomasz Grysztar 23 Jul 2006, 14:16
Quote: F:\testinggrounds\ASM>hello.asm You did edit it with Notepad, perhaps? I suggest using some editor that is able to save UTF-8 without adding a BOM. |
|||
23 Jul 2006, 14:16 |
|
kohlrak 23 Jul 2006, 14:20
BOM? Do explain, cause i was planning on making a unicode text (and hex) editor in the long run based on notepad's output. (and i might be able to hexout the "bom".)
|
|||
23 Jul 2006, 14:20 |
|
Tomasz Grysztar 23 Jul 2006, 14:32
See for example http://www.w3.org/International/questions/qa-utf8-bom or google for more.
From a nice editors that can write UTF-8 files without adding a BOM I can recommend PSPad. |
|||
23 Jul 2006, 14:32 |
|
f0dder 23 Jul 2006, 14:38
BOM is a prefix code that tells editors what format the text is in (utf-8, one of the 16bit encodings, bla bla). Try saving some unicode text in notepad and have a look at it with a hex editor.
GoASM supports UNICODE natively, but IMHO the best thing to do when you need unicode is to store all your strings externally. Either as resources + loadstring, or some of your own. It's easier to manage that way, especially if you want to translate your app to other languages. |
|||
23 Jul 2006, 14:38 |
|
kohlrak 23 Jul 2006, 15:12
No more giving back...
Last edited by kohlrak on 07 Aug 2008, 15:09; edited 2 times in total |
|||
23 Jul 2006, 15:12 |
|
Tomasz Grysztar 23 Jul 2006, 15:30
You need an "include" statement appropriate for your encoding. You didn't look at the example I attached above, did you?
See also http://flatassembler.net/docs.php?article=win32#1.7 |
|||
23 Jul 2006, 15:30 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.