[p4] What should I set P4CHARSET to when using Visual Studio p4vs plug-in ?

gsb perforce-user-forum at forums.perforce.com
Fri Jul 26 08:25:01 PDT 2013


Posted on behalf of forum user 'gsb'.

I'm using Visual Studio 2010 with the p4vs 2013.2 plug-in and p4v client
2013.1/611291.  Our Perforce server is unicode enabled.   I
notice that Visual Studio saves *.vcxproj and other project-related files in
"UTF8 with signature (BOM)" format where it prepends BOM chars 
at the start of the file.   Some of our *.cpp source code files have
extended characters like French or Chinese chars in string
literals.  When these files are auto-added to Perforce control
they're set with filetype = <utf16>.  Occasionally, our
users will some how manage to corrupt and submit these project files such that
later on other users open the solution in Visual Studio and get errors loading
projects like this:

"Unable to read the project
file"myProject.csproj".  The project file could not be
loaded.  The root element is missing."
or
hexadecimal value 0x1F, is an invalid character. Line 1, position 1.

Q:  What should I set P4CHARSET to ?  From the perforce doc,
seems my choices are:

Unicode Client Byte-Order-Mark
P4CHARSET Unicode written to
settings Format files
------------------------------------------------------------------
utf8 UTF-8 No
utf8-bom UTF-8 Yes
utf8unchecked UTF-8 (not validated) No
utf8unchecked-bom UTF-8 (not validated) Yes
utf16 UTF-16 in client byte order Yes
utf16le UTF-16 in Little Endian order Yes (Windows Style)
utf16be UTF-16 in Big Endian order Yes
utf16-nobom UTF-16 in client byte order No
utf16le-nobom UTF-16 in Little Endian order No
utf16be-nobom UTF-16 in Big Endian order No
utf32 UTF-32 in client byte order Yes
utf32le UTF-32 in Little Endian order Yes
utf32be UTF-32 in Big Endian order Yes
utf32-nobom UTF-32 in client byte order No
utf32le-nobom UTF-32 in Little Endian order No
utf32be-nobom UTF-32 in Big Endian order No

Thanks for advice/comments.
-Greg



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/2673-what-should-i-set-p4charset-to-when-using-visual-studio-p4vs-plug-in



More information about the perforce-user mailing list