• Advertisement
Sign in to follow this  

Simple Issue

This topic is 4385 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

Is anyone else getting this error? c:\program files\microsoft directx sdk (december 2005)\include\d3d9types.h(1385) : warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss I checked the line of code it's talking about but there's nothing about it that should be causing problems. It's pure alphanumerics. Any ideas what i can do about this without destroying portability to any system but my own?

Share this post


Link to post
Share on other sites
Advertisement
Is it actually causing any errors when it comes to compiling? As in, you've got the warning but is that it?

932 is a Japanese codepage (figures given your location [smile]) whereas my copy of d3dtypes.h is in codepage 1232, which should match up with what Microsoft are using given they're an American company.

Possibly putting:

#pragma warning( disable : 4819 )
#include <d3dx9.h> // or "dxstdafx.h"
#pragma warning( default : 4819 )


will keep the compiler quiet for you? [smile]

hth
Jack

Share this post


Link to post
Share on other sites
Just for the heck of it I'll post that line of code, in case there's something in the whitespace I'm not seeing:


D3DFMT_INDEX32 =102,

Share this post


Link to post
Share on other sites
Oh nooooooo I dislike pragma for warnings that could otherwise be avoided. Is there anything I can do to fix this file and put this warning to bed?

Oh yes I keep getting those two words mixed up. Yes, it's a warning, not causing any problems in finishing the compiling.

Share this post


Link to post
Share on other sites
Well, if the problematic character is invisible (e.g. a WS), then you could try to rewrite the line character by character in its minimalistic form just below its original, and delete the orignal one. If, on the other hand there are dozens of such problems, well ...

However, Unicode's purpose is to force portability, and nowadays OSes should support it well. So in general using it is wise; however, I don't know what happens in the case of compilers hit unicode headers ...

Share this post


Link to post
Share on other sites
Should I switch over all my regional settings temporarily while I reinstall the SDK? Would that help?

Share this post


Link to post
Share on other sites
Quote:
Original post by pteri498
Oh nooooooo I dislike pragma for warnings that could otherwise be avoided. Is there anything I can do to fix this file and put this warning to bed?

hehe - yeah, I know what you mean. I don't like disabling warnings, but I'm finding I use it more and more with Visual C++ 2005 due to it deprecating all the 'classic' string functions [headshake]

I do find it odd that only that line is causing problems - particularly when it's as simple as the one you've posted. If portability were an issue for the SDK then I'd expect to see many more errors.

Something to try presuming you have VStudio:

Open up d3dtypes.h and then go to "File" -> "Advanced Save Options". See what it thinks its using and try changing it. For example, change it from 1232->932 or 932->1232... save the file (overrite the original). Maybe saving it to the codepage that matches everything else will stop it complaining [smile]

hth
Jack

Share this post


Link to post
Share on other sites
This is strange.

I've just come out of a restart, changing my non-unicode program encoding to English (United States), and with no other changes to the code the warnings have stopped.

Maybe VC++ 2005 Express is depending a little on non-unicode program settings?

Share this post


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

  • Advertisement