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

File encoding is UTF-16LE

From: 沙飞漠里 <molishafei_at_gmail.com>
Date: Fri, 6 Dec 2019 14:53:15 +0800

Dear Mr./Ms.

  Does SVN support file with the encoding UTF-16LE as the text file?
  I have a text file("test.txt") and the file's encoding is UTF-16LE. I
want SVN to treate this file("test.txt") as a text file, so I change its
property svn:mime-type: application/octet-stream to
svn:mime-type:text/plain.
  SVN will insert the utf-8 string ("<<<<<<< .mine" , "|||||||| .r2",
">>>>>>>> .r3") in the conflicting area of "test.txt" When
"test.txt" conflict occurs. Because the file's encoding is UTF-16LE,the
content of the "test.txt" is garbled.

  What should I do to make SVN insert the UTF-16LE string ("<<<<<<<
.mine" , "|||||||| .r2", ">>>>>>>> .r3") in the conflicting area of
"test.txt"? Thank you!

  The steps of my operation:
  1. Add “test.txt” with the encoding UTF-16LE to the working copy.
  2. Change its property to svn:mime-type:text/plain , and commit it.
  3. Check out it to working copy 1 and working copy 2.
  4. Insert new line with content "111" at the end of "test.txt" at the
working copy 1, and commit it.
  5. Insert new line with content "222" at the end of "test.txt" at the
working copy 2.
  6. Update working copy 2. "test.txt" conflict occurs.

Best wishes.
Received on 2019-12-06 07:53:50 CET

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

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