3

we've recently started using p4api.net and ran into a problem very quickly. The depot contains a lot of files having special characters in their names, especially german umlauts (ä,ö,ü,ß).

When using the command line (p4 sync) the files are synced correctly. Using p4api.net performing SyncFiles the file are synced differently, with file names containing chars like "ü" instead of "ü". Is there any option to explicitely tell SyncFiles or the connection to use a certain encoding?

P.S. The environment variable P4CHARSET is already set..

For the purpose of completion here is the code we use to sync:

Server server = new Server(new ServerAddress(MainSettings.Default.Server));
Repository rep = new Repository(server);
Connection con = rep.Connection;

con.UserName = MainSettings.Default.User;
con.Client = new Client
{
    Name = MainSettings.Default.Workspace
};

if (con.Connect(null))
{
    foreach (var depot in MainSettings.Default.Depots)
    {
        var fileSpecList = con.Client.SyncFiles(null, FileSpec.ClientSpec(depot));
        ...
    }
}
Frederic
  • 116
  • 4

0 Answers0