P4.Net and P4CHARSET

I use P4.Net to connect to my server other than unicode, however some of the commands that I run with work with:

              "Unicode clients require a unicode enabled server."

How do I change P4CHARSET to none in P4.Net? I tried

              P4Connection p4 = new P4Connection();
              p4.Charset = "none"
              p4.Connect()

I also tried changing Charset just before the p4.Run command:

              p4.Charset = "none"
              p4.Run("where", "c:\\some\\random\\dir");

I tried setting Charset to "none", null and "".

if I try to pass global parameters to the p4.Run command, it does not work either. i.e.

              p4.Run("-C none where", "c:\\some\\random\\dir");

Unable to execute Unknown Command

Has anyone had success with changing P4CHARSET in a P4.Net script? how do you do it

+3
source share
4 answers

P4CHARSET P4COMMANDCHARSET ? HKEY_CURRENT_USER.Software.Perforce.Environment. , , , .

, P4Win P4V? P4V, , P4Win, , . , P4.NET - ?

UPDATE

API ++ Unicode, P4CHARSET . p4 set P4CHARSET= .

+2

, ClientApi_m.cpp:


 void p4dn::ClientApi::Init( p4dn::Error* e ) 
 { 
    if(getClientApi()->GetCharset().Length() > 0)
    {
        // unicode server use UTF-8
        _encoding = new System::Text::UTF8Encoding();

        // set the translations (use UTF-8 for everything but content).
        CharSetApi::CharSet content = CharSetApi::Lookup(getClientApi()->GetCharset().Text());
        getClientApi()->SetTrans(CharSetApi::CharSet::UTF_8, content, 
            CharSetApi::CharSet::UTF_8, CharSetApi::CharSet::UTF_8);
    }
    else
    {
        // non-unicode server use ANSI encoding
        _encoding = System::Text::Encoding::GetEncoding(1252);
    }
    getClientApi()->Init( e->get_InternalError() );
 }

getClientApi()->GetCharset().Length() , , .. P4CHARSET - "none".

, getClientApi()->SetTrans(0, 0, 0, 0);, 0 CharSetApi::CharSet::NOCONV, .

, . .

- ?

+1

p4.Charset "iso8859-1" - .

0

, , p4.Charset . , Unicode, -Unicode, , Charset - .

0

All Articles