You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by 沙飞漠里 <mo...@gmail.com> on 2019/12/06 06:53:15 UTC
File encoding is UTF-16LE
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.
Re: File encoding is UTF-16LE
Posted by Mark Phippard <ma...@gmail.com>.
On Fri, Dec 6, 2019 at 1:53 AM 沙飞漠里 <mo...@gmail.com> wrote:
> Dear Mr./Ms.
>
> Does SVN support file with the encoding UTF-16LE as the text file?
>
My understanding is that only UTF-8 can be supported as text and other UTF
encodings can only be handled as binary.
There are a decent amount of past threads on this. Here is one:
https://svn.haxx.se/users/archive-2017-10/0072.shtml
Mark Phippard
http://markphip.blogspot.com/