Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Recent Topics
Advanced Search
BP-VA incorrectly works with Subversion on Windows  
Forum Index -> Business Process Visual ARCHITECT (BP-VA)
Author Message
Nad


Joined: 2008/03/19
Messages: 23

Offline

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.

Nad
 
LilianWong


Joined: 2008/02/22
Messages: 452

Offline

Hi Nad,

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.

Best regards,
Lilian Wong
 
Nad


Joined: 2008/03/19
Messages: 23

Offline

Hi Lilian,

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):
Code:
 
 import sys
 import os
 from subprocess import Popen, PIPE
 from locale import getdefaultlocale
 from win32console import GetConsoleOutputCP
 
 windows_cp = getdefaultlocale()[1]                  #==> 'cp1251'
 console_cp = 'cp%d' % GetConsoleOutputCP()  #==> 'cp866'
 
 sys.argv[0] = '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 output:
     if '--xml' in sys.argv:
         output = output.decode('utf-8').encode(windows_cp)
     else:
         output = output.decode(console_cp).encode(windows_cp)
     sys.stdout.write(output)
 if errors:
     errors = errors.decode(console_cp).encode(windows_cp)
     sys.stderr.write(errors)
 
 sys.exit(p.returncode)
 


HTH,

Nad
 
LilianWong


Joined: 2008/02/22
Messages: 452

Offline

Hi Nad,

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.

Best regards,
Lilian Wong
 
LilianWong


Joined: 2008/02/22
Messages: 452

Offline

Hi Nad,

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.
http://files3.visual-paradigm.com/200804/Patch/sp1_20080311zh/Business_Process_Visual_ARCHITECT_Windows_2_2_sp1_20080311zh.exe
(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)

Note:
1. make sure that the regional settings are using your desired formats (please refer to regional_settings.png)
2. also, make sure that the system setting is using your desired language (please refer to advanced_setting.png)
3. 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.

Best regards,
Lilian Wong

Attached Image : No description given (31 kb)

Attached Image : No description given (14 kb)

Attached Image : No description given (31 kb)

 
Nad


Joined: 2008/03/19
Messages: 23

Offline

Hi Lilian,

I confirm that your latest patch fixed the problem with Subversion.
Thank you very much.

Nad
 
LilianWong


Joined: 2008/02/22
Messages: 452

Offline

Hi Nad,

You are welcome. If there are any inquiries, please feel free to contact me again.

Best regards,
Lilian Wong
 
 
   Forum Index -> Business Process Visual ARCHITECT (BP-VA)
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil