The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Victor Stout on December 27, 2010, 01:41:23 AM

Title: Does MASM compiler support unicode source files?
Post by: Victor Stout on December 27, 2010, 01:41:23 AM
Hello everyone. When I save .asm file in Notepad as ANSI - it compiles, but when I save it as Unicode then A2044 error (invalid character in file) is produced. How can I successfully use a unicode file? Thanks.

P.S. Glad to join the community.
Title: Re: Does MASM compiler support unicode source files?
Post by: dedndave on December 27, 2010, 01:55:26 AM
http://www.masm32.com/board/index.php?topic=15166.msg122951#msg122951

i think that's the right tool
it will create a linkable OBJ file
Title: Re: Does MASM compiler support unicode source files?
Post by: Victor Stout on December 27, 2010, 02:17:03 AM
Thanks for responce dedndave. Are Unicode files supported by ml compiler itself? I wouldn't like to use any third party tools, only those that come with Windows SDK and Visual Studio.
Title: Re: Does MASM compiler support unicode source files?
Post by: dedndave on December 27, 2010, 02:29:00 AM
actually, i have never tried it
if i were to use unicode strings, i would probably put them in a resource file
Title: Re: Does MASM compiler support unicode source files?
Post by: Victor Stout on December 27, 2010, 02:50:10 AM
Quote from: dedndave on December 27, 2010, 02:29:00 AM
if i were to use unicode strings, i would probably put them in a resource file
Good idea.
Title: Re: Does MASM compiler support unicode source files?
Post by: ToutEnMasm on December 27, 2010, 07:59:41 AM
If the "A2044 error " is an ml error,you need yo modify the defaut code page.
Is this can be done only for one page,I don't know but it seems possible.
Try to make a batch with the chcp command
Quote
SET ...
chcp N
..
ml /C ..

Title: Re: Does MASM compiler support unicode source files?
Post by: GregL on December 28, 2010, 02:48:23 AM
I don't think ml.exe can handle a Unicode file. Save your source code file as an ASCII file.
Title: Re: Does MASM compiler support unicode source files?
Post by: dedndave on December 28, 2010, 02:58:40 AM
i think the resource compiler is the way to fly
refer to RC.HLP in \masm32\bin folder
"MESSAGETABLE" statement
ResEd, ResEdit, and the others probably have a better way to handle it
i am just learning how to use these tools   :P