Why can I not use umlauts in my commit messages?

Asked by Timmie

When committing with a message containing umlauts (ü, ä, ö) I got the following error message:

bzr: ERROR: The specified commit message contains characters unsupported by the current encoding.

Why can I not include these characters?
Is this planned in the future?

Thanks.

Question information

Language:
English Edit question
Status:
Expired
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
John A Meinel (jameinel) said :
#1

Are you using the cygwin version of bzr?

It works pretty much everywhere else. The problem is that Cygwin itself is not able to understand the terminal encoding.

Alternatively, you may be on another platform and just not have your encoding defined. For example, you may try:

export LANG=en_US.UTF-8

and then see if that allows you to use extended characters.

Basically, there are lots of ways that systems can define their encoding (iso-8859-1, utf-8, cp1251, etc), so bzr uses the environment to determine how to decode your message. If the environment isn't configured correctly, or if you are using cygwin (which doesn't support anything but ASCII) then we have this problem.

If you *are* using cygwin, then I would recommend just switching to the win32-native installers available at:
https://launchpad.net/bzr/1.7/1.7.1 (or 1.8/1.8, or the new 1.9/1.9rc1 if you want to try it).

Revision history for this message
Timmie (timmie) said :
#2

When this error occured I was using Ubuntu Linux.

echo $LANG
de_DE.UTF-8

Revision history for this message
Martin Pool (mbp) said :
#3

This seems to work for me

mbp@lithe% LANG=de_DE.UTF-8 bzr ci -m "ä" --unchanged
Committing to: /tmp/a/
Committed revision 2.

However, I see this message is raised from the code that reads in a commit message from $EDITOR, when it can't be read in osutils.get_user_encoding. I can also commit that text from vim run as the editor.

So in the first place I would suspect that Tim's editor is not actually saving the file as utf-8. Tim, what editor are you using? Can you save a copy of the message template and attach that to this bug?

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.