bzr bundle fails to find base64mIme if the branch contains a signed commit when ran in Turkish locale

Bug #285491 reported by Serkan Kaba
10
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned

Bug Description

When the source branch has a signed commit bzr bundle fails with the following error with Turkkish locale.
bzr: ERROR: No module named base64mIme
You may need to install this Python library separately.

Notice the case of I in base64mIme. This may be caused by different handling of I and i in Turkish.
In Turkish uppercase i is İ and lowercase I is ı.

Thanks in advance.

Revision history for this message
Andrew Cowie (afcowie) wrote :

This sort of thing is a serious problem. You have to use a locale aware (or more to the point, a locale-ignoring) case conversion function.

We ran into something like this in java-gnome. See http://bugzilla.gnome.org/show_bug.cgi?id=529052#c5 and java-gnome 'mainline' revno 491 where we explicitly forced English as the locale rules. [some conversion transparently use the active locale, and so internals that assume that i will transform into I and vice versa will break for people in Turkish locales]

AfC

Revision history for this message
Rail Aliiev (rail) wrote :

FYI. You can find a brief description about Turkish related problems and possible solutions here:
http://www.i18nguy.com/unicode/turkish-i18n.html

Especially, see "Why Applications Fail With The Turkish Language."

Revision history for this message
Mert Dirik (mertdirik) wrote :

IMHO it should be solved on Python side. We can't just patch every app. to use locale-ignoring functions. You may look at the patches applied on Debian's Python:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489740

Revision history for this message
Serkan Kaba (serkan-kaba) wrote :

Isn't there still a need for locale aware upper/lower case?

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 285491] Re: bzr bundle fails to find base64mIme if the branch contains a signed commit when ran in Turkish locale

On Fri, 2008-10-24 at 03:11 +0000, Serkan Kaba wrote:
> Isn't there still a need for locale aware upper/lower case?

The problem is occuring in interpreting code that should have been
parsed as plain ascii (the encoding of the source file).

It's certainly a problem - and we should check to see if there is
something bzr can do to avoid the problem.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
Serkan Kaba (serkan-kaba) wrote :

What I was considering there was Python itself. Indeed bzr needs a locale-ignoring case conversion here.

Revision history for this message
Serkan Kaba (serkan-kaba) wrote :

I'm working around the issue by setting LC_ALL to C before calling bzr bundle. bzr executable sets this variable to '' to workaround locale problems but that doesn't seem to be the correct solution. A simple fix is to change these to 'C' instead of an empty string. Please evaluate this fix (I don't know how it can affect other parts of Bazaar nor plugins) and consider it's addition to tree.

Thanks.

Revision history for this message
Barry Warsaw (barry) wrote :

If you want local-ignoring to-upper to and to-lower conversions, why not use str.translate()?

Revision history for this message
Robert Collins (lifeless) wrote :

Serkan, could you please:
 - delete ~/.bzr.log
 - trigger the failure
 - attach the resulting ~/.bzr.log to this bug

This will let us ascertain in more detail what is occuring.

Thanks,
Rob

Revision history for this message
Serkan Kaba (serkan-kaba) wrote :

Thanks for helping me to debug the issue I was actually looking for a way to debug it. I discovered that I'm hitting bug in emaillib of python that's fixed in Pardus and Debian by Pardus's patch[1]. I'm attaching to log anyways.

1: http://svn.pardus.org.tr/pardus/2008/system/base/python/files/trfix_emaillib.patch

Revision history for this message
Robert Collins (lifeless) wrote :

Not a bug in bzr itself, fixed in python- closing.

Changed in bzr:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.