Wireshark-dev: Re: [Wireshark-dev] Some problems when building Wireshark from source(with more
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sat, 15 Dec 2007 11:54:18 -0800
tan tan wrote:

packet-wbxml.c(5216) : error C2220: warning treated as error - no 'object' file
generated
packet-wbxml.c(5216) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss

That file contained a byte with the value 0x96; it appears it was intended to be a dash or hyphen of some sort - 0x96 is an en dash in Windows code page 1252.

Your system is, I suspect, set up to use a Chinese code page, and 0x96 might, for example, be the first byte of a two-byte character, but the byte after it was a blank (0x20), which is probably not a valid second byte of a two-byte character.

I checked in a change to replace the 0x96 with '-'; that was the only non-ASCII character in the file. That should fix the problem - try compiling the current top-of-tree SVN snapshot.

We should avoid using non-ASCII characters in source files, to avoid problems such as this. Unfortunately, that could be a problem for people with names containing accented letters - another person, probably also building on Windows in a Chinese locale, had similar problems, which I fixed by fixing the files, but one of them was a problem in a comment, so it appears that we even need to avoid non-ASCII characters in comments.