Hi Lilian and Jick,
BP-VA fails to communicate with Subversion if project and/or directory names contain non-ASCII characters.
BP-VA expects to receive the output from Subversion encoded in Windows default locale. But this is wrong assumption.
If ‘–xml’ argument is present in the command line, then Subversion returns its output in UTF-8. Otherwise the output is encoded in “Windows console output code page” (OEM code page), which is different from Windows default “ANSI code page”.
I created a small wrapper around svn.exe (or should I call it proxy?). Basically, it calls the “real” svn.exe with arguments received from BP-VA, and re-encodes the results (and errors from stderr) to “ANSI code page” before returning them to BP-VA. With this wrapper all goes OK.
Thank you for your post. I’ve forwarded the problem to our engineers for investigation. Once there is any feedback, I’ll come back to you.
Just in case – I want to report that the latest BP-VA 2.2 patch (Build sp1_20080311w) does NOT solve the problem with Subversion.
Here’s the text of my wrapper which I use to resolve this problem (in Python):
from subprocess import Popen, PIPE
from locale import getdefaultlocale
from win32console import GetConsoleOutputCP
windows_cp = getdefaultlocale() #==> 'cp1251'
console_cp = 'cp%d' % GetConsoleOutputCP() #==> 'cp866'
sys.argv = 'C:\\Program Files\\Subversion\\bin\\svn.exe'
p = Popen(sys.argv, stdout=PIPE, stderr=PIPE, env=os.environ)
output, errors = p.communicate()
output = output.replace('\r', '') # remove extra carriage returns
if '--xml' in sys.argv:
output = output.decode('utf-8').encode(windows_cp)
output = output.decode(console_cp).encode(windows_cp)
errors = errors.decode(console_cp).encode(windows_cp)
Thanks for your post and the details. The patch I sent to you last time contains fixes about generating reports and project publisher (I’ve mentioned in the reply), not including the fix in working with Subversion yet. I’m sorry if I made any misunderstanding.
Our engineers are fixing the Subversion problem at the moment, I’ll notify you immediately when it’s fix.
If you have any inquiries, please feel free to contact me.
I would like to inform you that the problem about BP-VA worked incorrectly in Subversion is fixed in our application. Please download the patch in the following link and see whether it works.
(FYI, this patch include the fix of report generation setting problem you posted in http://forums.visual-paradigm.com/posts/list/2988.html as well)
- make sure that the regional settings are using your desired formats (please refer to regional_settings.png)
- also, make sure that the system setting is using your desired language (please refer to advanced_setting.png)
- if it doesn’t work, start up the command prompt, right-click on it heading and select Defaults. Then check the default encoding to make sure it’s the desired language (please refer to default_encoding.png)
If you have any inquiries, please feel free to contact me again.
I confirm that your latest patch fixed the problem with Subversion.
Thank you very much.
You are welcome. If there are any inquiries, please feel free to contact me again.