Closed Bug 328589 Opened 18 years ago Closed 18 years ago

VC8 doesn't like copyright sign in jscompat.h

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jshin1987, Assigned: jshin1987)

Details

(Keywords: fixed1.8.1)

jscompat.h has a copyright sign ('©') in ISO-8859-1  (this comment itself is in UTF-8)

 Copyright © 1996-1999 Netscape Communications Corporation, All Rights Reserved.

When it's compiled on Windows whose 'ANSI' codepage is NOT Windows-1252, VC8 generates a lot of warnings that read 
" warning C4819: The file cont
ains a character that cannot be represented in the current code page (949). Save
 the file in Unicode format to prevent data loss"

('949' is for Korean, but it'd happen for all non-single byte codepages)

Unless the copyright sign is absolutely necessary, we should get rid of it (or delete the line and add an approrpriate copyright line the way it's done elsewhere).
Feel free to switch to:
(C)

Gerv
fix landed by mrbkap 

revision 3.9
date: 2006/03/11 04:05:13;  author: mrbkap%gmail.com;  state: Exp;  lines: +1 -1
VC8 doesn't like the copyright sign in jscompat.h. Issue found by jshin, bug 328
589, r=gerv/mrbkap
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
I think it would be good for vc8 to be able build js16 in non single byte codepages. Asking for 1.8.1 approval so that this will be in the next release js17 based off of 1.8.1.
Blocks: js1.6rc1
Flags: blocking1.8.1?
Flags: in-testsuite-
Is there maybe a compiler flag to make VC8 (or any other compiler) use a specific code page instead of the system code page?

If so, we would need to ensure that the whole code base is in the /same/ code page (and enforce that for all checkins) but that would be a rather good idea anyway.
(In reply to comment #4)
> Is there maybe a compiler flag to make VC8 (or any other compiler) use a
> specific code page instead of the system code page?

Perhaps, it's '/codepage' because it can be specified for Visual Basic [1] but I can't find any document as to whether it works for Visual C/C++.




> If so, we would need to ensure that the whole code base is in the /same/ code
> page (and enforce that for all checkins) but that would be a rather good idea
> anyway.

In that case, IMO, it should be UTF-8 (codepage 5xxxx). Some of our files need to be in UTF-8 (xul, pref..js  etc) so that using a single encoding across should help us avoid an unnecessary hassle.

 
[1] http://msdn2.microsoft.com/en-us/library/974213w8(VS.80).aspx
Sure, let's take it on the branch.
Flags: blocking1.8.1? → blocking1.8.1+
Can we get a 1.8.1 branch patch worked up? It looks like mrbkap just checked it in directly to trunk ...
Whiteboard: [checkin needed]
gavin: if you can just take care of this that'd be much appreciated!
mozilla/js/src/jscompat.h 	3.8.58.1
Keywords: fixed1.8.1
Whiteboard: [checkin needed]
not on 1.8.0, not making js16
No longer blocks: js1.6rc1
You need to log in before you can comment on or make changes to this bug.