The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: hamidamel on November 21, 2009, 08:32:29 AM

Title: problem with string
Post by: hamidamel on November 21, 2009, 08:32:29 AM
i have a problem.
i want to use string in masm32,but i dont know what do i do.
can you help me? or give me an example?

tank you
Title: Re: problem with string
Post by: UtillMasm on November 21, 2009, 08:44:22 AM
invoke MultiByteToWideChar,CP_Windows936_Chinese(RPC),0,_lpszFile,eax,addr buffer,sizeof buffer,NULL,NULL
          ;read simplified chinese ansi characters as widechar
invoke WideCharToMultiByte,CP_UTF8,0,_lpszFile,eax,addr buffer,sizeof buffer,NULL,NULL
          ;store any ansi characters as utf8
Title: Re: problem with string
Post by: hutch-- on November 21, 2009, 08:59:27 AM
hamidamel,

W3lcome on board. Just tell us a bit about what you want to do with strings and if they are simple ANSI strings or more complex character sets like Chinese, Japanese or similar.