2647: P4 charset setting is ignored when making a connection

ray****@gmai***** (Google Code) (Is this you? Claim this profile.)
Dec. 20, 2012
What version are you running?
1.6.9

What's the URL of the page containing the problem?
Assuming the P4 server is configured to unicode mode:
/r/<review id>, for any Perforce diff.
/admin/db/scmtools/repository/<repo id>/, on clicking "save" for a Perforce repository.

What steps will reproduce the problem?
Attempt to view an uploaded diff, or save the repository configuration. This causes RB to execute a "p4 describe" command, which fails because the "encoding" setting under the advanced options is apparently ignored.

What is the expected output? What do you see instead?
The P4 connection should respect the encoding setting and the command should successfully execute. Instead, an error is thrown from P4:

SCMError: [P4#run] Errors during command execution( "p4 describe -s 1" )

	[Error]: 'Unicode server permits only unicode enabled clients.'

What operating system are you using? What browser?
Server is running RHEL5. Locally I'm running OS X 10.7.4 and Safari 5.1.7, although I do not believe this is relevant here.


Please provide any additional information below.
Reviewing the code in scmtools/perforce.py, neither the __init__ method that initializes the client, nor the _connect method that initiates the connect appear to respect the encoding setting that was saved in the administration dashboard. I'm able to work around the issue by editing _connect to force the encoding to utf8, but the correct fix should be to read in the correct encoding from the repository settings and use that.
david
#1 david
This is fixed in more recent versions.
  • +Fixed