Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: asyikarea51 on November 07, 2009, 09:56:10 pm

Title: This safe to ignore?
Post by: asyikarea51 on November 07, 2009, 09:56:10 pm
Code: [Select]
warning C4819: The file contains a character that cannot be represented in the current code page (xxx). Save the file in Unicode format to prevent data loss
Yes, that... on VS2008. If it's not safe to leave that alone then I'll just change back things over here.

There's something else I was going to bring up about VS2005 (something to do with missing files o_O???) but later on that...
Title: Re: This safe to ignore?
Post by: The E on November 07, 2009, 10:03:33 pm
Would help if you told us what file it is complaining about....And if you changed anything in it...(If this is about FSO, that is).

In general, while a warning may not be significant, or affect the executable, it is always a good idea to try and eliminate them.
Title: Re: This safe to ignore?
Post by: asyikarea51 on November 07, 2009, 11:18:08 pm
missionparse.h

That's all I see in the Debug and SSE2 release build logs here.

No, I did not change anything. Just straight download from SVN and compile.

Reason I asked if it's safe or not... I did change some things in the regional and language options; semi-expected this to happen. I haven't tried the compiled build yet but if any coder can tell me outright "yes, it affects the game in some major way or another" then I'll just change the language back whenever I need to compile...
Title: Re: This safe to ignore?
Post by: Aardwolf on November 08, 2009, 12:36:15 am
It's a compiler warning, and a pretty straight-forward one at that; it says that there's a non-standard character somewhere in the file.

And (my guess is) it probably shouldn't be there.
Title: Re: This safe to ignore?
Post by: asyikarea51 on November 08, 2009, 01:17:44 am
Quote
And it probably shouldn't be there.

I know, it isn't (and shouldn't); the "problem" is with me and not the code. Just asking if I need to change back my settings whenever I compile a build, or if it's safe to leave that warning alone.
Title: Re: This safe to ignore?
Post by: chief1983 on November 08, 2009, 05:43:03 am
Without knowing where the problem is, probably not.  If it's in a hardcoded text string, you'll probably live.  If it's in logic, it will likely cause problems.  Also, the VC2005 project files are out of date.  We're updating the VC2008 and then probably the VC6 ones, but the stuff in between is kind of falling behind since most everyone on the team has upgraded to the new hawtness or is still running on the original compiler (I do both).
Title: Re: This safe to ignore?
Post by: asyikarea51 on November 08, 2009, 08:58:04 am
Without knowing where the problem is, probably not.  If it's in a hardcoded text string, you'll probably live. If it's in logic, it will likely cause problems.

So much for regional and language options then. :nervous: That said, the warning appears like, a lot of times in some places and once or twice in other parts when the compile's going on.

Any Japanese here compiled SCP code before in your native language setting (i.e. no English)? Did anything go wrong/act weird/break? :nervous:

Also, the VC2005 project files are out of date.  We're updating the VC2008 and then probably the VC6 ones, but the stuff in between is kind of falling behind since most everyone on the team has upgraded to the new hawtness or is still running on the original compiler (I do both).

For some reason this reads like an invitation for "crash test dummies" to me :lol:

Well on 2005 I just got a whole bunch of file not found errors and they looked like part of DirectX or something (looking at only filenames though). I miss VC6...
Title: Re: This safe to ignore?
Post by: portej05 on November 08, 2009, 09:06:03 am
Well on 2005 I just got a whole bunch of file not found errors and they looked like part of DirectX or something (looking at only filenames though).
yeah, no-one has got a copy with which to update the solutions.


I miss VC6...

I'm hoping this is in jest.
VC6 was developed before C++ was standardised and is broken in a bunch of ways (some of which we've had to work around in FSO thanks to its borked template handling).
Title: Re: This safe to ignore?
Post by: asyikarea51 on November 09, 2009, 04:37:28 am
I'm hoping this is in jest.
VC6 was developed before C++ was standardised and is broken in a bunch of ways (some of which we've had to work around in FSO thanks to its borked template handling).

Not entirely... lol

Well I'm just a n00b anyhow and I don't think I was taught that far in the classes I sat for. No idea where to self-learn it any further for the sake of hobbyism (yes blackhole I'm looking at you :P) + I'm not in an IT-centric field + not a lot of free time these days.

IDK you could prolly say I was more used to the VC6 way of things when compiling and setting all those little flags for Inferno and speech... haha

return 0; :nervous:
Title: Re: This safe to ignore?
Post by: portej05 on November 09, 2009, 07:21:37 am
We all learn though!

VC6 is broken in 2 fairly critical ways (and many other ways too!):
1) For loop scope:
Code: [Select]
for ( int i = 0; i < 10; i++ )
{
}
i is still valid after that loop has executed

2) Koenig lookups (argument dependency):
Code: [Select]
template< const size_t Size_T >
void function( int (&var[ Size_T ] ) )
{
}


int buf[ 100 ];
function( buf );

That code snippet is valid C++ but does not compile under VC6 (and is basically the core of safe_strings and of a number of array safety libraries)
Title: Re: This safe to ignore?
Post by: Mongoose on November 09, 2009, 11:28:29 pm
We all learn though!

VC6 is broken in 2 fairly critical ways (and many other ways too!):
1) For loop scope:
Code: [Select]
for ( int i = 0; i < 10; i++ )
{
}
i is still valid after that loop has executed
Ewwww.  Whose brilliant idea was that?
Title: Re: This safe to ignore?
Post by: asyikarea51 on November 10, 2009, 04:49:45 am
o_O loop?

Loops like that I know. Come to void/function/var/const/template, nope. Wasn't taught that jargon and will probably never learn it. :lol:

I don't completely understand what you mean by "still valid"... that, or we just wrote simple programs and the i was most always used alone and nobody really saw what was broke.
Title: Re: This safe to ignore?
Post by: portej05 on November 10, 2009, 04:56:11 am
ah, sorry, wasn't the most clear
The following two pieces of code are equivalent in VC6
Code: [Select]
int i = 0;
for ( i = 0; i < 10; i++ )
{
}

int j = i;

Code: [Select]
for ( int i = 0; i < 10; i++ )
{
}
int j = i;

It's a buggered scoping rule
Title: Re: This safe to ignore?
Post by: The E on November 10, 2009, 09:09:08 am
Note that the second example is supposed to produce an error, as i is no longer valid outside of the for loop.