[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problems with packages/diffs showing NULs

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Wed, 28 Aug 2013 20:13:22 +0200

On 28.08.2013 19:48, Jeff Crowley wrote:
> I'm a new user to TortoiseSVN and I'm using it with TestComplete
> (automation tool similar to HP QTP). The script files are *.sj but are
> just plain text files. TortoiseSVN was treating them as binary so when I
> created a package, it wouldn't report the diff. (I still don't
> understand that since I can see diffs from the Commit dialog so maybe
> I'm just missing something obvious?) So... to attempt to remedy this, I
> changed the mime-type (of every file individually, ugh!) to text,
> created a new patch with some simple changes, and now I can see the diff
> (kinda) but every other character is some NUL (?) character which makes
> it impossible to read.
>
> I can open the *.sj files with Windows Notepad so I know they are text
> of some flavor. Maybe they are encoded a certain way and that's causing
> the issue? I'm not sure how to proceed.
>
> I've attached a sample *.sj file and a screenshot of the patch diff so
> you can see the issue.
>
> Here are my questions:
> 1. How do I solve the NUL character in the patch diff issue?

Sorry, you can't.

> 2. How can I set up TortoiseSVN so that all *.sj files are treated as
> text mime-type (or whatever is needed so that I can view patch diffs)
> automatically?

Don't do that!

Your files are text, but encoded in utf-16 (sometimes also referred to
as UNICODE encoded, but that's not correct). Subversion can not deal
with those files as text so it has to treat them as binary.
TortoiseSVN can show diffs of such files just fine because it fetches
both files (in case of a diff). But creating a patch is done by the svn
library alone and therefore such files are treated as binary.
You've changed the mime-type manually, so now the svn library assumes
those files are proper text (ANSI or utf-8 encoded) - but since that's
not true you see the NUL chars, and you will get that file corrupted in
the future. Please change the mime-type of those files back to binary to
avoid data corruption.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3063507
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-08-28 20:13:32 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.