Special character "ß" cannot be used in the commit message.

Bug #258349 reported by Ingo Kappler
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Triaged
Low
Unassigned

Bug Description

1. The Error:
------------------------------------------------------------------
ingo@IngoLaptop /cygdrive/c/JJCouvenGallery_orig
$ bzr commit -F .bzrcommitmessage
Committing to: /cygdrive/c/JJCouvenGallery_orig/
modified INSTALLIERE_JJCouvenGallery.exe
modified JJCouvenGallery/pms_config.ini
modified JJCouvenGallery/jjcg2/INSTALLIERE_JJCouvenGallery.nsi
modified JJCouvenGallery/jjcg2/HDconfig/pms_config.ini
modified JJCouvenGallery/jjcg2/HDconfig/pms_config_firefox_portable.ini
added JJCouvenGallery/jjcg2/bin/remove_attributes.bat
bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xdf in position 271: ordinal not in range(128)

Traceback (most recent call last):
  File "commands.py", line 846, in run_bzr_catch_errors
  File "commands.py", line 802, in run_bzr
  File "commands.py", line 504, in run_argv_aliases
  File "builtins.py", line 2381, in run
  File "decorators.py", line 165, in write_locked
  File "workingtree_4.py", line 246, in commit
  File "decorators.py", line 165, in write_locked
  File "mutabletree.py", line 190, in commit
  File "commit.py", line 367, in commit
  File "builtins.py", line 2371, in get_message
  File "/tmp/python.6884/usr/lib/python2.5/codecs.py", line 618, in read
    return self.reader.read(size)
  File "/tmp/python.6884/usr/lib/python2.5/codecs.py", line 424, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xdf in position 271: ordinal not in range(128)

bzr 1.4 on python 2.5.1 (cygwin)
arguments: ['/usr/bin/bzr', 'commit', '-F', '.bzrcommitmessage']
encoding: 'US-ASCII', fsenc: 'US-ASCII', lang: None
plugins:
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.
------------------------------------------------------------------

2. The original commit message leading to the above issue:
------------------------------------------------------------------
Version 0.92-1
- Remove read only file properties after installation on any system
  (fixes Gallery2 write problems because of write protected files
   during startup on W2K, not (yet) encountered on XP or Vista)
- Changed in pms_config.ini to ShowShutdownMessage="Schließe {SERVER_NAME}"
------------------------------------------------------------------

3. The log after the issue was solved including the adjusted commit message:
------------------------------------------------------------------
ingo@IngoLaptop /cygdrive/c/JJCouvenGallery_orig
$ bzr commit -F .bzrcommitmessage
Committing to: /cygdrive/c/JJCouvenGallery_orig/
modified INSTALLIERE_JJCouvenGallery.exe
modified JJCouvenGallery/pms_config.ini
modified JJCouvenGallery/jjcg2/INSTALLIERE_JJCouvenGallery.nsi
modified JJCouvenGallery/jjcg2/HDconfig/pms_config.ini
modified JJCouvenGallery/jjcg2/HDconfig/pms_config_firefox_portable.ini
added JJCouvenGallery/jjcg2/bin/remove_attributes.bat
Committed revision 13.

ingo@IngoLaptop /cygdrive/c/JJCouvenGallery_orig
$ bzr log
------------------------------------------------------------
revno: 13
committer: Ingo Kappler <email address>
branch nick: JJCouvenGallery_orig
timestamp: Fri 2008-08-15 17:44:37 +0200
message:
  Version 0.92-1
  - Remove read only file properties after installation on any system
    (fixes Gallery2 write problems because of write protected files
     during startup on W2K, not (yet) encountered on XP or Vista)
  - Changed in pms_config.ini to ShowShutdownMessage="Schlie(sz)e {SERVER_NAME}"
------------------------------------------------------------

4. Summary:
So the issue occurs when using the special character "ß" as part of the commit message.

Regards,
Ingo

Revision history for this message
Ingo Kappler (ingo-kappler) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

bzr 1.4 on python 2.5.1 (cygwin)
arguments: ['/usr/bin/bzr', 'commit', '-F', '.bzrcommitmessage']
encoding: 'US-ASCII', fsenc: 'US-ASCII', lang: None
plugins:

Unfortunately, on Cygwin, the only encoding it supports is US-ASCII (as seen in the log and traceback).

If you use the native win32 package, you can use any unicode character that is available in your encoding. (For English windows this is cp1252, it may be different for your windows installation.)

There are ways to trick cygwin into allowing non-ascii characters, but IIRC they are difficult.

Changed in bzr:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Ingo Kappler (ingo-kappler) wrote : Re: [Bug 258349] Re: Special character"ß" cannot be used in the commit message.

Hi John,

ok, thanks for the answer. So it doesn't seem to be a real bug. I
decided to go with the Cygwin version since this is what appeared to be
recommended in the download area.

Since the issue is definitely low, I am not sure right now it's worth
checking out the native windows version but thanks for the hint.

Ingo

John A Meinel wrote:
> bzr 1.4 on python 2.5.1 (cygwin)
> arguments: ['/usr/bin/bzr', 'commit', '-F', '.bzrcommitmessage']
> encoding: 'US-ASCII', fsenc: 'US-ASCII', lang: None
> plugins:
>
> Unfortunately, on Cygwin, the only encoding it supports is US-ASCII (as
> seen in the log and traceback).
>
> If you use the native win32 package, you can use any unicode character
> that is available in your encoding. (For English windows this is cp1252,
> it may be different for your windows installation.)
>
> There are ways to trick cygwin into allowing non-ascii characters, but
> IIRC they are difficult.
>
>
> ** Changed in: bzr
> Importance: Undecided => Low
> Status: New => Triaged
>

Revision history for this message
John A Meinel (jameinel) wrote :

I'm quite surprised that the cygwin would be the "recommended" version. Often I've considered even removing it from the list of supported versions. It works fine (and is supported), but it generally is quite a bit slower than the native version. And as you notice, it does not have Unicode support. This is mostly just because of the overhead that cygwin introduces.

Anyway, as long as you feel things are working well, there certainly isn't a need to change. Just a recommendation. The only thing I'm aware of that the cygwin version provides, is if you need to use cygwin paths like /cygdrive/c/foo, or you need to manage the executable bit on windows. Though there is a plugin (x-bit) that you could use for that.

Revision history for this message
Ingo Kappler (ingo-kappler) wrote :

Hi John,

it seems I somehow misinterpreted the following from
http://bazaar-vcs.org/WindowsDownloads :

"This page covers downloads for Microsoft Windows, packaged into
installer executables. These are the best choice for Bazaar users on
Windows, but you can also get original source-only packages, and
packages for Unix, Mac OS and Cygwin.

This is the easiest way to install Bazaar even if you don't already have
Python. ..."

The last word Cygwin and the first sentence starting with "This is the
easiest way..."

So I guess I give the Windows version a chance later on.

Regards, Ingo

John A Meinel wrote:
> I'm quite surprised that the cygwin would be the "recommended" version.
> Often I've considered even removing it from the list of supported
> versions. It works fine (and is supported), but it generally is quite a
> bit slower than the native version. And as you notice, it does not have
> Unicode support. This is mostly just because of the overhead that cygwin
> introduces.
>
> Anyway, as long as you feel things are working well, there certainly
> isn't a need to change. Just a recommendation. The only thing I'm aware
> of that the cygwin version provides, is if you need to use cygwin paths
> like /cygdrive/c/foo, or you need to manage the executable bit on
> windows. Though there is a plugin (x-bit) that you could use for that.

Revision history for this message
Bruno Matos (bruno-matos) wrote :

Hello I have a problem in Mac OS X with special characters in folder's names only. File names can have special characters. I'm using python 2.6.1 and bzr 1.10.

Thank you,
Bruno Matos

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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