[MERGE REVIEW] All ini files as utf-8
Martin Pool
mbp at sourcefrog.net
Mon Mar 6 03:17:51 GMT 2006
On 2006-03-06 Mon, at 1:42 PM, Robey Pointer wrote:
>
> On 3 Mar 2006, at 17:31, Aaron Bentley wrote:
>
>> |>This patch updates the config parsing to treat the config data
>> as utf-8.
>> |> This should fix the problems reported by Erik Bågfors and Carlos
>> |>Perelló Marín.
+1
>
>> === modified file 'a/bzrlib/tests/test_config.py'
>> --- a/bzrlib/tests/test_config.py
>> +++ b/bzrlib/tests/test_config.py
>> @@ -1,3 +1,4 @@
>> +# -*- coding: utf-8 -*-
>> # Copyright (C) 2005 by Canonical Ltd
>> # Authors: Robert Collins <robert.collins at canonical.com>
>> #
>> @@ -30,7 +31,7 @@
>>
>> sample_long_alias="log -r-15..-1 --line"
>> sample_config_text = ("[DEFAULT]\n"
>> - "email=Robert Collins <robertc at example.com>\n"
>> + u"email=Erik Bågfors <erik at bagfors.nu>\n"
>> "editor=vim\n"
>> "gpg_signing_command=gnome-gpg\n"
>> "log_format=short\n"
>
> I don't know how good everyone's editor is, so maybe it won't be a
> problem converting the file to utf8. However, you can get the same
> effect by using a unicode \uxxxx escape and leaving the file in ascii.
Yes, I think that'd be better. You can also say
u"email=Erik B\N{LATIN SMALL LETTER A WITH RING ABOVE}gfors
<erik at bagfors.nu>\n"
for the sake of legibility. (Note that this only works in u-prefixed
unicode literals.)
--
Martin Pool
More information about the bazaar
mailing list