[RFC] diff header encoding for Windows users

Alexander Belchenko bialix at ukr.net
Tue May 25 10:56:26 BST 2010


Martin Pool пишет:
> On 24 May 2010 20:13, Alexander Belchenko <bialix at ukr.net> wrote:
>> Hi,
>>
>> I'm working on Bug #382699 https://bugs.launchpad.net/bzr/+bug/382699.
>> I've started this work at UDS with some help from Aaron (thanks!)
> 
> I started on a different but related thing after talking to you at
> UDS, which is adding an option to set the output encoding.  In the
> course of that I was thinking that we probably want at least a couple
> of different encoding options:
> 
>  * the bulk output encoding, used for eg showing the content of diffs
>  * the terminal encoding
> 
> For instance if I do 'bzr diff >diff.out' then I might want one
> encoding for the diff sent to the file and another for the progress
> bars.
> 
> Perhaps I'd even want one encoding for the filenames in the diff and a
> different one for the file contents within the diff?

I don't think so (today). Until bzr will have versioned properties which 
can be used to specify the encoding of each file, you can't control 
encoding of file content in diff output.

> For now I was just going to add output_encoding and terminal_encoding
> and then people can add more if it's necessary.

What's difference between output_encoding and terminal_encoding?

> The way I intend to implement this is by adding a configuration option
> for the encodings, then adding a per-process configuration layer that
> can be fed by a -O option.  Then we don't need to add per-command
> options or global options for every single thing.

something like:

bzr -O output_encoding=utf-8 diff
?

My idea was just

bzr --encoding=utf-8 diff

similar to svn.

> Your reasoning about different commands sounds ok to me.
> 
> One might also want to explicitly configure the filename encoding on Unix.

OK, good.



More information about the bazaar mailing list