Re: svn prop*-commands not filtering encoding
Daniel Sahlberg via TortoiseSVN-dev <[email protected]> Mon, 2 Dec 2024 23:36:31 -0800 (PST)
| Newsgroups | gmane.comp.version-control.subversion.tortoisesvn.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_31506_120470262.1733211391370 Content-Type: multipart/alternative; boundary="----=_Part_31507_247107323.1733211391370" ------=_Part_31507_247107323.1733211391370 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable tisdag 3 december 2024 kl. 08:09:39 UTC+1 skrev [email protected]: Hi! TL;DR: - Properties are handled as byte sequences and are not converted to the= =20 command line encoding. - Bug or feature? Yesterday, while scripting, I stumbled upon a strange phenomenon with the= =20 CLI-tool svn.exe. File names and log entries are properly converted to=20 encoding of command line or repository (Codepage 437 / 850, ANSI, UTF8 <=3D= >=20 UTF8). However, input and output of the commands svn prop* seems not. If I= =20 pass a string encoded in Codepage 850 or ANSI, it appears exactly as that= =20 in e.g. svn:externals. This behaviour is disastrous for file names containing umlauts or other=20 characters beyond code point 127 (h7F). Then a "=C3=9Cberraschung" turns in= to a=20 surprise=E2=80=A6 This behaviour seems only effecting svn.exe. Loading these strings into the= =20 TortoiseSVN property dialogue converts the every encoding and the issue=20 don't comes up. Is it simple this an intended behaviour of the svn prop* commands (thus=20 poorly documented) or simply a bug? Merci for a short reply. Hi, I tried but I can't really figure out where the problem is. I think a short= =20 reproduction script would help a lot to explain the issue. Several of the Subversion command line tools have an --encoding option=20 described like this in the Subversion book: [[[ --encoding *ENC* Tells Subversion that your commit message is composed using the character= =20 encoding provided. The default character encoding is derived from your=20 operating system's native locale; use this option if your commit message is= =20 composed using any other encoding. ]]] Maybe this helps? I'd also like to mention that issues related to the command line client is= =20 better answered on [email protected] where you will find many of= =20 the Subversion developers. However at the moment I'm not sure if the issue= =20 is in the command line client or in TortoiseSVN. Kind regards, Daniel Cheers ToraxMalu --- Ich hoffe, das hilft dir! Wenn du noch weitere Fragen hast oder=20 Unterst=C3=BCtzung ben=C3=B6tigst, stehe ich dir gerne zur Verf=C3=BCgung. --=20 You received this message because you are subscribed to the Google Groups "= TortoiseSVN-dev" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/tortoisesvn= -dev/41e27384-7121-4233-9a31-215fb83ba063n%40googlegroups.com. ------=_Part_31507_247107323.1733211391370 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <br /><br /><div><div dir=3D"auto">tisdag 3 december 2024 kl. 08:09:39 UTC+= 1 skrev [email protected]:<br /></div><blockquote style=3D"margin: 0p= x 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1= ex;"><div>Hi!</div><div><br /></div>TL;DR:<br /><ul><li>Properties are hand= led as byte sequences and are not converted to the command line encoding.</= li><li>Bug or feature?</li></ul><div>Yesterday, while scripting, I stumbled= upon a strange phenomenon with the CLI-tool svn.exe. File names and log en= tries are properly converted to encoding of command line or repository (Cod= epage 437 / 850, ANSI, UTF8 <=3D> UTF8). However, input and output of= the commands svn prop* seems not. If I pass a string encoded in Codepage 8= 50 or ANSI, it appears exactly as that in e.g. svn:externals.</div><div><br= /></div><div>This behaviour is disastrous for file names containing umlaut= s or other characters beyond code point 127 (h7F). Then a "=C3=9Cberraschun= g" turns into a surprise=E2=80=A6</div><br /><div>This behaviour seems only= effecting svn.exe. Loading these strings into the TortoiseSVN property dia= logue converts the every encoding and the issue don't comes up.</div><div><= br /></div><div></div><div>Is it simple this an intended behaviour of the s= vn prop* commands (thus poorly documented) or simply a bug?</div><div><br /= ></div><div>Merci for a short reply.</div></blockquote><div><br /></div><di= v>Hi,</div><div><br /></div><div>I tried but I can't really figure out wher= e the problem is. I think a short reproduction script would help a lot to e= xplain the issue.</div><div><br /></div><div>Several of the Subversion comm= and line tools have an --encoding option described like this in the Subvers= ion book:</div><div>[[[</div><span style=3D"color: rgb(0, 0, 0); line-heigh= t: 1.33em; font-family: serif; font-size: medium;">--encoding=C2=A0<em>ENC<= /em></span><div><span style=3D"color: rgb(0, 0, 0); font-family: serif; fon= t-size: medium;">Tells Subversion that your commit message is composed usin= g the character encoding provided. The default character encoding is derive= d from your operating system's native locale; use this option if your commi= t message is composed using any other encoding.</span></div><div>]]]</div><= div><br /></div><div>Maybe this helps?</div><div><br /></div><div>I'd also = like to mention that issues related to the command line client is better an= swered on [email protected] where you will find many of the Subve= rsion developers. However at the moment I'm not sure if the issue is in the= command line client or in TortoiseSVN.</div><div><br /></div><div>Kind reg= ards,</div><div>Daniel</div><div><br /></div><div><br /></div><blockquote s= tyle=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204= ); padding-left: 1ex;"><div><br /></div>Cheers<br />ToraxMalu<br /><br />--= -<br /><br />Ich hoffe, das hilft dir! Wenn du noch weitere Fragen hast ode= r Unterst=C3=BCtzung ben=C3=B6tigst, stehe ich dir gerne zur Verf=C3=BCgung= .<br /></blockquote></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;TortoiseSVN-dev" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">tor= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= tortoisesvn-dev/41e27384-7121-4233-9a31-215fb83ba063n%40googlegroups.com?ut= m_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/tor= toisesvn-dev/41e27384-7121-4233-9a31-215fb83ba063n%40googlegroups.com</a>.<= br /> ------=_Part_31507_247107323.1733211391370-- ------=_Part_31506_120470262.1733211391370--