subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Skwar <alexanders.mailinglists+nos...@gmail.com>
Subject Re: svn checkout - special characters in file name are not encoding properly
Date Fri, 13 Aug 2010 07:47:37 GMT
Hi.

2010/8/13 Vincent Lefevre <vincent-svn@vinc17.net>:
> On 2010-08-13 08:16:48 +0200, Alexander Skwar wrote:
>> 2010/8/13 Vincent Lefevre <vincent-svn@vinc17.net>
>> >
>> > On 2010-08-12 17:16:37 +0200, Stefan Sperling wrote:
>>
>> > > ~/bin/mysvn:
>> > >  #!/bin/sh
>> > >  env LC_CTYPE="en_US.<preferred charset>" svn update
>> >
>> > Wrong, wrong, wrong! Security hole!
>>
>> No, not wrong, but totally correct - especially, if you need to parse the
>> output in some script, you (kinda) MUST set the locale to some value,
>> that you know. Leaving it in a undefined state is no good at all.
>
> No it is wrong because the above script may send non-printable
> characters to the terminal, such as control sequences. Such
> control sequences can wreck the terminal and depending on its
> configuration, send the contents to a printer.

Well, if you want or need to parse the output of a program,
you'll need to make sure that it's in the "correct" locale. The
way to do that, is by setting the locale variables to the expected
values. Thus, it's totally correct to set LC_CTYPE to some
predefined value. Omiting this is just plain wrong. You're suggesting
that this should be omitted.

Alexander
--
↯    Lifestream (Twitter, Blog, …) ↣ http://alexs77.soup.io/     ↯
↯ Chat (Jabber/Google Talk) ↣ a.skwar@gmail.com , AIM: alexws77  ↯

Mime
View raw message