Jump to content
  • Advertisement
Sign in to follow this  
ChaosPhoenix

[SOLVED]MultiByteToWideChar not displaying properly?

This topic is 4275 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've run into a bit of an interesting problem. I work on 2 PCs; one with an install of Visual C++ Express 2005, and the other with Visual Studio .NET 2003. I worked all day on a project using the VC Express compiler and things were working perfectly. I take it home to my visual studio .NET compiler and now all my console text that I use "MultiByteToWideChar" to format is showing up as missing characters or random symbols. I'm using WriteConsole which requires a WCHAR string, so I wrote conversion functions and all was well. However, I cannot figure out why the .NET compiler is weirding out over the MultiByteToWideChar function. It seems any text formatted by that function, on this machine, causes corrupt text. Maybe it's just something as simple as a project setting, but I'm out of ideas. Here is the text working correctly: Here it is on the .NET 2003 compiler: [Edited by - ChaosPhoenix on November 6, 2006 5:28:24 PM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Paulius Maruska
Can't say for sure, but i think VS2003 defaulted to ANSI, and VS2005 defaults to Unicode.
Just try to define UNICODE and _UNICODE (globally in your project settings).


Worked perfectly. Thank you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!