Syncro SVN Client

Encoding of files

Other Syncro SVN Client issues not covered by the other forums.

Encoding of files

Postby Bastian » Wed Mar 11, 2009 1:35 pm

Hello,

I'm a cross platform developing (MacOSX and Windows), I've switched from CVS to subversion a few weeks ago and running into problems. My CVS client changes the file enconding while check out. So I had the correct file encoding on each platform.

Syncro SVN is the best choise because it's running on Windows and MacOSX.

But I have a problem with Resource script files used by the resource compiler.

If I created my resource script on Mac the resource compiler needs MacRoman file encoding (it contains language depended strings).
This file checked out on Windows has the wrong encoding for Windows, so all German umlauts and other non-ascii characters are incorrect. The same problem if the file is created on Windows in ISO-Latin1 encoding.

I've found that Syncro SVN allows to set an encoding for Non-XML files, but there is no way to configure which files should be processed.

Are these encoding settings allows me to change the encoding of specified files and does this affect the file content itself or is this option for the internal editor only.

Is there another way to change the encoding of files while checking out.


Best regards

Bastian
Bastian
 
Posts: 4
Joined: Wed Mar 11, 2009 1:21 pm

Re: Encoding of files

Postby sorin » Thu Mar 12, 2009 3:48 pm

Hello,

Bastian wrote:My CVS client changes the file enconding while check out.
...

I've found that Syncro SVN allows to set an encoding for Non-XML files, but there is no way to configure which files should be processed.

Are these encoding settings allows me to change the encoding of specified files and does this affect the file content itself or is this option for the internal editor only.

Is there another way to change the encoding of files while checking out.



The option Encoding for non XML files from the Preferences is applied to all the files of the local working copy that are not associated with the internal XML editor of Syncro SVN Client, that is files that are not associated with the internal XML editor in Preferences -> SVN File Editors (for XML files the encoding is detected from the file content). There is no option in SVN clients or SVN servers for converting automatically the file content of files that are checked out or committed.

Are you sure a CVS client or a SVN client should change the content of a file that is checked out or committed? Some CVS clients allow changing the encoding of file names and commit comments on check out and commit operations but not the file content. What CVS client do you use?


Regards,
Sorin
sorin
 
Posts: 171
Joined: Tue Feb 13, 2007 3:45 pm

Re: Encoding of files

Postby Bastian » Thu Mar 12, 2009 4:26 pm

Hello,

The option Encoding for non XML files from the Preferences is applied to all the files of the local working copy that are not associated with the internal XML editor of Syncro SVN Client, that is files that are not associated with the internal XML editor in Preferences -> SVN File Editors (for XML files the encoding is detected from the file content). There is no option in SVN clients or SVN servers for converting automatically the file content of files that are checked out or committed.


OK, this affects only the internal editor of Syncro SVN.

Are you sure a CVS client or a SVN client should change the content of a file that is checked out or committed? Some CVS clients allow changing the encoding of file names and commit comments on check out and commit operations but not the file content. What CVS client do you use?


We are using MacCVSX and WinCVS (both from http://www.wincvs.org/).
These clients allow to define an encoding for text files. So the client converts the file while checkout and commit to the "correct native" encoding, which is not completely correct in all situation, but works for us since 10 years.

I'm not sure whether this concept is the right one, but, I think it should be an option in the Syncro SVN client to allow converting for a specified file type or to define user scripts which are executed.

We have nearly 200 different projects in our SVN repository and each of them has one or more .r resource script files containing the strings for the application. Because nearly all of these projects are crossplatform we won't use resource editors on each platform and enter all the strings on both platforms. So we use plain text files containing the strings which can be compiled on both platform (if they have the correct encoding for this platform).

I think it is not really neccessary to have an automatic file encoding on client side, but there should be the possibility to call a user defined script which does maybe the encoding or any other task while checkout or commit.


Thank you for answering my question.
At the moment it's a little bit frustrating using subversion. First we are running into problems regarding resource forks on MAC and now the encoding problem of some files.


Best regards

Bastian
Bastian
 
Posts: 4
Joined: Wed Mar 11, 2009 1:21 pm

Re: Encoding of files

Postby sorin » Thu Mar 12, 2009 4:56 pm

Bastian wrote:I think it is not really neccessary to have an automatic file encoding on client side, but there should be the possibility to call a user defined script which does maybe the encoding or any other task while checkout or commit.


You can create and configure a pre-commit hook on the SVN server if you want to process the files that are committed. There is no standard SVN feature (client side or server side) for translating the file content between two different encodings.


Regards,
Sorin
sorin
 
Posts: 171
Joined: Tue Feb 13, 2007 3:45 pm


Return to Other Issues

Who is online

Users browsing this forum: No registered users and 1 guest


© 2002-2013 SyncRO Soft Ltd. All rights reserved. | Sitemap | Terms of Use | Privacy Policy | This website was created & generated with <oXygen/>® XML Editor