flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Main > fasm utf8 | 
| Author | 
 | 
| revolution 23 Nov 2008, 12:37 fasm does not support source files in UTF-8 or Unicode format. The macros for UTF-8 can only be used to create strings from the ASCII 8-bit input source file.
 So that means your Chinese (I'm not sure if it is Chinese but anyway) characters (which are in UTF-8 or Unicode format) cannot be used in that way. You need to use this: Code: _str dw 0x1234, 0xabcd, ... | |||
|  23 Nov 2008, 12:37 | 
 | 
| MHajduk 23 Nov 2008, 12:51 revolution
 Console version of FASM supports files encoded in UTF-8 format (did you see sources of my programs?  ). skykrnl See, I've changed this example program from FASM 'Examples' subdirectory Quote: 
  See attachment. BTW, 我是中国人 means "I am Chinese".  
 Last edited by MHajduk on 23 Nov 2008, 13:02; edited 1 time in total | ||||||||||
|  23 Nov 2008, 12:51 | 
 | |||||||||
| revolution 23 Nov 2008, 12:55 MHajduk wrote: Console version of FASM supports files encoded in UTF-8 format   MHajduk wrote: (did you see sources of my programs?  | |||
|  23 Nov 2008, 12:55 | 
 | 
| skykrnl 23 Nov 2008, 13:17 Microsoft Windows XP [版本 5.1.2600]
 (C) 版权所有 1985-2001 Microsoft Corp. fasm 1.67.29 >fasm t.asm flat assembler version 1.67.29 (1225152 kilobytes memory) t.asm [8]: _str du '我是中国人', 0 C:\Documents and Settings\User\桌面\fasmw16729/include/ENCODING/utf8.inc [79] du [1]: du args } C:\Documents and Settings\User\桌面\fasmw16729/include/ENCODING/utf8.inc [46] du [41]: load char byte from current+2 error: value out of range. 21:15:58> MHajduk wrote: revolution | |||
|  23 Nov 2008, 13:17 | 
 | 
| MHajduk 23 Nov 2008, 13:34 revolution wrote: 
  . skykrnl I have Windows XP SP3 Home Edition. Are you sure that you don' make any error somewhere else in your source? See attachment: 
 | ||||||||||
|  23 Nov 2008, 13:34 | 
 | |||||||||
| baldr 23 Nov 2008, 13:54 skykrnl,
 May be you can post offending source? I'd compiled MHajduk's example mod without a hitch and even run resulting .Exe — OK. | |||
|  23 Nov 2008, 13:54 | 
 | 
| revolution 23 Nov 2008, 14:01 [aol]Me too[/aol] although I get the result as shown below. But basically no problems here either. 
 Last edited by revolution on 23 Nov 2008, 14:03; edited 1 time in total | ||||||||||
|  23 Nov 2008, 14:01 | 
 | |||||||||
| skykrnl 23 Nov 2008, 14:02 please upload all the project files includes fasm,Thank you!
 MHajduk wrote: 
 | |||
|  23 Nov 2008, 14:02 | 
 | 
| revolution 23 Nov 2008, 14:04 skykrnl wrote: please upload all the project files includes fasm,Thank you! | |||
|  23 Nov 2008, 14:04 | 
 | 
| sleepsleep 09 Jan 2009, 08:49 i might as well make it a screenshot.
 the file is saved with UTF8 using notepad. 
 Last edited by sleepsleep on 09 Jan 2009, 08:56; edited 2 times in total | ||||||||||
|  09 Jan 2009, 08:49 | 
 | |||||||||
| vid 09 Jan 2009, 11:45 Yep, known problem. FASM doesn't support files with Byte Order Mark. | |||
|  09 Jan 2009, 11:45 | 
 | 
| Grom PE 09 Jan 2009, 13:13 Heh, if you write "=5" on the first line, it doesn't complain anymore. | |||
|  09 Jan 2009, 13:13 | 
 | 
| sleepsleep 10 Jan 2009, 01:53 awesome tips!!, it works gracefully, thanks Grom PE | |||
|  10 Jan 2009, 01:53 | 
 | 
| goldenspider 05 Oct 2011, 09:42 aha, if you are Chinese, you can use utf16.inc.
 for example: 
 
 | ||||||||||||||||||||
|  05 Oct 2011, 09:42 | 
 | |||||||||||||||||||
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.