Download Pelles C here: http://www.smorgasbordet.com/pellesc/
QuoteIt seems that the assembler doesnt' encode properly the unicode text strings.Yes I think that ...
Replacing the special unicode characters with their respective hex values it works
Quotemsg dw 'This a UNICODE test 'Nice trick!
INCBIN "UnicodeText.txt"
dw 0
.386
.model flat,stdcall
option casemap:none
MessageBoxW PROTO :DWORD,:DWORD,:DWORD,:DWORD
MessageBox TEXTEQU <MessageBoxW>
ExitProcess PROTO :DWORD
.data
title dw 'UnicodeTest',0
msg dw 'This a UNICODE test '
INCBIN "UnicodeText.txt"
dw 0
.code
start:
invoke MessageBox,0,ADDR msg,ADDR title,0
invoke ExitProcess,0
END start
ă î ș ț
Quote from: Vortex on Yesterday at 12:06:24 PMHi LeraUnu,
Thanks, your example works fine but my Poasm test is always failing.
- What is the version of your Pelles C setup? Mine is 13
- What's the encoding of your Pelles C editor? Mine is UTF16-LE
Could you check the attachment? I guess my source file cannot correctly encode those special characters.
Quoteset the encoding of the source files to UTF-16LE and everything is ok.
pFile 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F Value
00000000 EF BB BF 6D 65 73 73 61 67 65 20 64 77 20 27 54 message dw 'T
00000010 68 69 73 20 61 20 55 4E 49 43 4F 44 45 20 74 65 his a UNICODE te
00000020 73 74 20 C4 83 2C 20 C3 A2 2C 20 C3 AE 2C 20 C8 st ă, â, î, È
00000030 99 2C 20 C8 9B 27 2C 30 0D 0A ™, È›',0..
In UTF16 filepFile 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F Value
00000000 FF FE 6D 00 65 00 73 00 73 00 61 00 67 00 65 00 ÿþm.e.s.s.a.g.e.
00000010 20 00 64 00 77 00 20 00 27 00 54 00 68 00 69 00 .d.w. .'.T.h.i.
00000020 73 00 20 00 61 00 20 00 55 00 4E 00 49 00 43 00 s. .a. .U.N.I.C.
00000030 4F 00 44 00 45 00 20 00 74 00 65 00 73 00 74 00 O.D.E. .t.e.s.t.
00000040 20 00 03 01 2C 00 20 00 E2 00 2C 00 20 00 EE 00 ...,. .â.,. .î.
00000050 2C 00 20 00 19 02 2C 00 20 00 1B 02 27 00 2C 00 ,. ...,. ...'.,.
00000060 30 00 0D 00 0A 00 0.....
In object filepFile 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F Value
000000EB 48 00 65 00 6C 00 6C 00 6F 00 00 00 54 00 68 00 H.e.l.l.o...T.h.
000000FB 69 00 73 00 20 00 61 00 20 00 55 00 4E 00 49 00 i.s. .a. .U.N.I.
0000010B 43 00 4F 00 44 00 45 00 20 00 74 00 65 00 73 00 C.O.D.E. .t.e.s.
0000011B 74 00 20 00 C4 00 83 00 2C 00 20 00 C3 00 A2 00 t. .Ä.ƒ.,. .Ã.¢.
0000012B 2C 00 20 00 C3 00 AE 00 2C 00 20 00 C8 00 99 00 ,. .Ã.®.,. .È.™.
0000013B 2C 00 20 00 C8 00 9B 00 00 00 ,. .È.›...
Page created in 9.080 seconds with 15 queries.