I’m using P4.Net to connect to my non-unicode server however some commands i run fail with:
"Unicode clients require a unicode enabled server."
how do i change the P4CHARSET to none in P4.Net? I’ve tried
P4Connection p4 = new P4Connection();
p4.Charset = "none"
p4.Connect()
i’ve also tried changing the Charset just before the p4.Run command:
p4.Charset = "none"
p4.Run("where", "c:\\some\\random\\dir");
i’ve tried setting the Charset to “none”, null and “”.
if i try passing global options to the p4.Run command it doesn’t work either. ie.
p4.Run("-C none where", "c:\\some\\random\\dir");
fails with “Unknown Command”
has anyone had any success with changing the P4CHARSET within a P4.Net script? how do you do it?
Have you tried nuking P4CHARSET and P4COMMANDCHARSET from your registry settings? They should be at HKEY_CURRENT_USER.Software.Perforce.Environment. I’ve been in a situation similar to yours before and that’s how I ended up fixing it.
Also, are you using P4Win or P4V? I’m not entirely sure about P4V, but I know P4Win seemed to store charset information per connection. Maybe that could be interfering with P4.NET somehow?
UPDATE
The C++ API was detecting a Unicode charset because the P4CHARSET was set to none. Running
p4 set P4CHARSET=from the command line fixed the issue for the poster.