^M Character
search cancel

^M Character

book

Article ID: 258872

calendar_today

Updated On:

Products

CA Harvest Software Change Manager

Issue/Introduction

It seems that when I transfer the file from Harvest (ASCII) to my home drive I find that ^M characters get included in the file, and it changes the checksum. So far, it only happens when I transfer to .sql and .ksh files. Please advise.

Environment

Release : 14.0

Cause

Something that Harvest does for you with files that are handled as text files (but not binary files) is that it pays attention to whether the end-of-line and end-of-file characters are formatted for Windows or Linux/Unix.  If a file was checked in on Linux but checked out to Windows it will try to convert the end-of-line formatting accordingly.   That's where the ^M is coming from.  The explanation is here: Administrate Repositories (see sections on File Extensions and File Conversion)

Resolution

You can try designating that Harvest treat those file extensions as binary instead of text.  That way no conversion happens and the file checks out exactly the same whether going to Windows or to Linux.

The other option would be to calculate the checksum on the Windows side rather than the Linux side.  This article suggests a couple of options for that: https://answers.microsoft.com/en-us/windows/forum/all/finding-checksum-values-in-windows-10/dbc3c569-4b5a-4967-8810-c25255cdc1fd