character encoding help

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
mattyp60
Posts: 6
Joined: Tue Sep 11, 2012 6:50 am

character encoding help

Post by mattyp60 » Wed Sep 12, 2012 1:28 am

I am trying to move a project from cp1252 to UTF8 to support Scandic and Cyrillic characters.

If I save a file as UTF8 (without BOM - as that causes problems with PHP+IE), add some test characters and then commit it to vault, there are two problems...

1) If I view the file in DiffMerge it gets the encoding wrong:

Image


2) If I delete my local copy of the file and then pull it from vault there is now no longer encoding explicitly set on the file:

Image

(in this case it inherits from the container which is fine but I'm worried new users pulling the whole repo will get the incorrect encoding)


I'm new to character encoding so apologies if I'm doing something stupid

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: character encoding help

Post by Beth » Wed Sep 12, 2012 3:52 pm

Are you Diff'ing against an old version? Are both sides of the Diff encoded wrong, or just the old one?

Instead of using your Diff/Merge to check your encoding, check the properties the same way you do when you pull a new version. Does it have the correct coding then?

You might need to change your Diff/Merge defaults. When the Diff/Merge window comes up, go to Tools - Options - Rulesets and make sure that you don't have Diff/Merge set to a different encoding for either the defaults or that file type.
Beth Kieler
SourceGear Technical Support

Post Reply