Boost logo

Boost :

From: Foster Brereton (fosterb.boost_at_[hidden])
Date: 2006-03-29 14:38:01


All,

We are getting warnings when trying to compile Boost source files with
MSVC 2003 and 2005 when there are high-ASCII characters in the
sources. The reported problem only shows up when the computer's region
is set to Japanese, but there could be other affected regions as well.
A viable workaround is changing the setting for non-Unicode programs
in the Control Panel/Regional and Language Options from Japanese to
English (United States), but this is very inconvenient for members of
our staff whose native region is Japanese.

One (abridged) example of the warning we get from MSVC is:
    While compiling boost\type_traits\is_base_and_derived.hpp:
    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.

A caveat to this problem is that the warning shows up when there are
high-ASCII characters in comments, so all copyright symbols and
high-ASCII characters used in names have the potential to generate
these compilation warnings for us.

Another caveat to this problem is not all high-ASCII characters
produce this problem. My guess is that some of the high-ASCII
characters have a valid code page translation (e.g., the copyright
symbol), and so the warning is not emitted. An implication of this
would be that some characters will work for some OS regions and not
for others, resulting in a varied set of errors based on the region
one has chosen.

The reason this is a problem is because our projects have
warnings-as-errors turned on. We are not interested in disabling
warnings-as-errors to mitigate the issue because of the far-reaching
side effects of such a change.

Has anyone else seen this problem? Are there other potential fixes
other than removing all high-ASCII characters from the source files?

Blessings,
Foster

--
Foster T. Brereton - Computer Scientist
Software Technology Lab, Adobe Systems Incorporated
fbrereto_at_[hidden]   --   http://opensource.adobe.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk