Re: diff/patch problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ulf-D. Ehlert wrote:
> Hi,
>
> Kolbjørn Stuestøl (Mittwoch, 10. Oktober 2007, 21:34):
>> Added my translations
>
> Did you use a Windows editor?
I'm using Notepad++ for this job.
> I'm pretty sure that after editing every line of the file contained a
> trailing "Carriage Return" character (CR aka \r aka ^M).
>
>> Looking at for example the file drop-shadow.xml in the test.patch the
>> only "normal" lines are the two first:
>>
>> --- src/filters/light_effects/drop-shadow.xml     (revision 2107)
>>
>> +++ src/filters/light_effects/drop-shadow.xml   (working copy)
>>
>> The next lines are marked for deletion with a minus sign (-):
>>
>> @@ -1,575 +1,581 @@
>>
>> -<?xml version="1.0" encoding="UTF-8"?>
>>
>> -
>>
>> .
>>
>> -  </sect3>
>>
>> -</sect2>
>>
>>
>>
>> Thereafter all lines, including my adding's, are signed with a plus
>> sign indicating this lines should be added:
>>
>> +<?xml version="1.0" encoding="UTF-8"?>
>>
>> +
>>
>> +<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
>>
>> +                "http://www.docbook.org/xml/4.3/docbookx.dtd";>
>
> The lines differ due to the invisible CR char.
>
>>> Hmm, trailing "^M"s in your modified files?! Try "cat -v
>>> file-name".
>>
>> No help, just added lots of "^M"s to the file.
>
> Yes!  "cat -v" or "cat --show-nonprinting" should just show you if
> there were trailing CR chars.
Oh so. What I thought was an error was the meaning using the command
>
> Example:
>
> [ulf@linux] cat -v file-without-CR
> foo
> bar
> [ulf@linux] recode lat1..ibmpc file-without-CR
> [ulf@linux] cat -v file-without-CR
> foo^M
> bar^M
> [ulf@linux] recode ibmpc..lat1 file-without-CR
> [ulf@linux] cat -v file-without-CR
> foo
> bar
>
> So you just have to remove these characters. Maybe there's an editor
> option to do this automatically? (BTW, did you change/update your
> editor?)
Yes, perhaps I forgot to change format to the same format as the updated files 
;-)
>
> Otherwise, you can try:
>
> tr -d '\r' < input_file_with_CR > output_file_without_CR
> or
> perl -i -p -e 's/\r$//' file_with_CR
> or
> sed -e 's/\r//' input_file_with_CR > output_file_without_CR
> or
>         recode ibmpc..utf8 file_with_CR
>
> after editing your files. (Check with "cat -v".)
>
> HTH
>
Thank you a lot. I'll try out your sugestions later today.
Kolbjørn

> Bye,
> Ulf
>
> _______________________________________________
> Gimp-docs mailing list
> Gimp-docs@xxxxxxxxxxxxxxxxxxxxxx
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-docs

_______________________________________________
Gimp-docs mailing list
Gimp-docs@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-docs


[Index of Archives]     [Video For Linux]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [Scanners]     [GEGL]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux