Apart from that, I tried to fix the diff file myself, just to check if the error was only during the generation of the diff file or also to apply an Unicode diff file. I edited the changes.diff file using Notepad++ and removed the \0 codes, so I had an ANSI diff file called changes_fixed.diff that also fails in the same way to apply the patch. I also converted the ANSI diff file into an Unicode UCS2-LittleEndian file with Notepad++, and now Subversion cannot apply the patch So, it seems there could be three bugs there: one in the creation of diff files, another one applying ANSI diff files to Unicode files, and another just working with Unicode diff files. I attach all the examples again, with the manually fixed diff files. Best regards,
Hugo González De: Hugo González [mailto:h.gonza...@ingeciber.com] Enviado el: viernes, 25 de noviembre de 2016 12:36 Para: 'users@subversion.apache.org' Asunto: Bug patching Unicode files Hello, and congratulations for your great job at the Subversion project. I think it is an amazing tool. I have found a bug when trying to apply a patch over a Unicode file. The steps to reproduce this bug are: 1. Create and version a Unicode file in your repository, for example: MyFavouriteChineseSentences.txt 2. Modify that Unicode file. 3. Create a patch with your modifications (svn diff > changes.diff) 4. Revert the modifications of the file. 5. Apply the patch to modify the file again (svn patch changes.diff) 6. You get a corrupted file and the modifications are lost. It seems the diff file is malformed, resulting in a corrupted patched file. I attach the documents of my example. I hope you can fix this, because I work with a lot of Unicode files, but I understand this could be difficult because of command line limitations Any feedback or advice will be welcome. Thank you very much in advance, Hugo González ____________________________________________________________________________ ___________________________________ Hugo González h.gonza...@ingeciber.com Tlf: +34 91 386 22 22 Fax: +34 91 386 45 80 Ingeciber S.A. Avda. Monforte de Lemos, 189 - 28035 - Madrid - España i...@ingeciber.com www.ingeciber.com | www.civilfem.com Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción. This message is intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege.If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it.
changes.diff
Description: Binary data
changes_fixed.diff
Description: Binary data
changes_fixed_unicode.diff
Description: Binary data
ÿþT h i s i s m y f a v o u r i t e C h i n e s e s e n t e n c e : (W)YzzÞL0 A n d t h i s i s s o m e t e x t I w a n t t o m o d i f y i n S u b v e r s i o n i n o r d e r t o s e e i f t h e r e i s a b u g i n t h e p a t c h f e a t u r e w h e n a p p l y i n g t o U n i c o d e f i l e s . . .
ÿþT