Opened 15 years ago

Closed 12 years ago

#1736 closed Bugs (wontfix)

Headers containing non ASCII characters cause MS VC to issue warning 4819 in some locales

Reported by: paulg+boost@… Owned by: Marshall Clow
Milestone: To Be Determined Component: None
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

Some boost headers, including but not limited to,

detail/utf8_codecvt_facet.hpp detail/allocator_utilities.hpp detail/atomic_count_gcc.hpp utility/enable_if.hpp config/compiler/sunpro_cc.hpp config/compiler/vacpp.hpp boost/ref.hpp

Contain non ASCII characters within comments. Some of these are copyright symbols others are within people names.

If this these files are fed to the Microsoft Visual C++ compiler and the system is set to use a locale which cannot represent these characters the following warning is produced

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"

In the specific case this was found it was with a Japanese version of Windows using SHIFT-JIS.

The best fix is to remove the non ASCII characters altogether as although it appears to be legal to feed unicode to a C++ compiler it is implementation defined what the compiler then does with it.

Change History (9)

comment:1 by Marshall Clow, 15 years ago

There's an open support request on this as well - #597 (http://svn.boost.org/trac/boost/ticket/597).

Replacing the "©" with "(c)" is easy; but the author's names are more problematic.

comment:2 by Marshall Clow, 15 years ago

I have replaced the "©" with "(c)" in the following files (revision #43992) - what other files offend the compiler?

boost/archive/detail/auto_link_archive.hpp boost/archive/detail/auto_link_warchive.hpp boost/archive/detail/basic_config.hpp boost/archive/detail/decl.hpp boost/archive/detail/utf8_codecvt_facet.hpp boost/config/abi_prefix.hpp boost/config/abi_suffix.hpp boost/detail/utf8_codecvt_facet.hpp boost/interprocess/errors.hpp boost/numeric/conversion/bounds.hpp boost/numeric/conversion/cast.hpp boost/numeric/conversion/conversion_traits.hpp boost/numeric/conversion/converter.hpp boost/numeric/conversion/converter_policies.hpp boost/numeric/conversion/detail/bounds.hpp boost/numeric/conversion/detail/conversion_traits.hpp boost/numeric/conversion/detail/converter.hpp boost/numeric/conversion/detail/int_float_mixture.hpp boost/numeric/conversion/detail/is_subranged.hpp boost/numeric/conversion/detail/meta.hpp boost/numeric/conversion/detail/sign_mixture.hpp boost/numeric/conversion/detail/udt_builtin_mixture.hpp boost/numeric/conversion/int_float_mixture.hpp boost/numeric/conversion/int_float_mixture_enum.hpp boost/numeric/conversion/is_subranged.hpp boost/numeric/conversion/sign_mixture.hpp boost/numeric/conversion/sign_mixture_enum.hpp boost/numeric/conversion/udt_builtin_mixture.hpp boost/numeric/conversion/udt_builtin_mixture_enum.hpp boost/program_options/detail/utf8_codecvt_facet.hpp boost/serialization/config.hpp boost/tokenizer.hpp boost/utility/enable_if.hpp libs/detail/utf8_codecvt_facet.cpp libs/filesystem/example/mbpath.cpp libs/filesystem/src/utf8_codecvt_facet.hpp libs/filesystem/test/equivalent.cpp libs/iostreams/test/detail/utf8_codecvt_facet.cpp libs/iostreams/test/detail/utf8_codecvt_facet.hpp libs/numeric/conversion/test/bounds_test.cpp libs/numeric/conversion/test/converter_test.cpp libs/serialization/src/codecvt_null.cpp libs/serialization/test/test_decl.hpp libs/tokenizer/char_sep_example_1.cpp libs/tokenizer/char_sep_example_2.cpp libs/tokenizer/char_sep_example_3.cpp libs/tokenizer/examples.cpp libs/tokenizer/simple_example_1.cpp libs/tokenizer/simple_example_2.cpp libs/tokenizer/simple_example_3.cpp libs/tokenizer/simple_example_4.cpp libs/tokenizer/simple_example_5.cpp libs/utility/enable_if/test/constructors.cpp libs/utility/enable_if/test/dummy_arg_disambiguation.cpp libs/utility/enable_if/test/lazy.cpp libs/utility/enable_if/test/lazy_test.cpp libs/utility/enable_if/test/member_templates.cpp libs/utility/enable_if/test/namespace_disambiguation.cpp libs/utility/enable_if/test/no_disambiguation.cpp libs/utility/enable_if/test/partial_specializations.cpp

comment:3 by Marshall Clow, 14 years ago

Owner: set to Marshall Clow

comment:4 by Marshall Clow, 14 years ago

Milestone: Boost 1.36.0To Be Determined

comment:5 by Marshall Clow, 14 years ago

Status: newassigned

As far as I know, there are no © symbols in either the trunk or the release branch.

comment:6 by Marshall Clow, 14 years ago

Missing word in the last comment: "As far as I know, there are NOW no © symbols"

comment:7 by viboes, 12 years ago

Couldn't we close this defect?

comment:8 by Daniel James, 12 years ago

The inspect report now checks for non-ASCII characters. It says there are 50 files (although that might be 50 characters). But I don't think there's any value in keeping this open as the report is enough.

comment:9 by viboes, 12 years ago

Resolution: wontfix
Status: assignedclosed

I've closed it. Please be free to open a new ticket by component having an issue with non-ASCII characters.

Note: See TracTickets for help on using tickets.