[PATCH stable v2] convert: use original local encoding when converting from Perforce

Frank Kingswood frank at kingswood-consulting.co.uk
Thu Jul 23 10:49:52 CDT 2015

On 23/07/15 16:14, Matt Mackall wrote:
> On Wed, 2015-07-22 at 23:18 +0100, Eugene Baranov wrote:
>> My 'active code page' is 850, but p4 indeed generates 1252-encoded text.
>> I've tried to 'convince' p4 to output in UTF-8, but so far I haven't
>> figured out how.
> This suggest the magic is to set P4CHARSET=utf8. And there also appears
> to be a -C switch to force the encoding:
> http://www.perforce.com/perforce/doc.current/user/i18nnotes.txt
Not a lot of time to think about this today, sorry.

I think setting P4CHARSET to any value at all fails unless the p4 server 
is running in "unicode mode", so that may not be useful. The help has 
this unhelpful paragraph:

     If P4CHARSET is not set explicitly when connecting to a Unicode mode
     server, a default charset will be chosen based on the client's
     platform and/or code page.


More information about the Mercurial-devel mailing list