Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3485576
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:55:27+00:00 2026-05-18T10:55:27+00:00

I tried doing a simple commit through my wrapper library for Mercurial, using the

  • 0

I tried doing a simple commit through my wrapper library for Mercurial, using the simple text of Unicode:æøåÆØÅ as my commit message. This is written to a text file and given to Mercurial with the appropriate parameter:

hg commit --logfile FILE

If I subsequently look at the repository with TortoiseHg, the characters are reproduced correctly. On the Console, they are mangled:

[C:\Temp] :hg log
changeset:   0:6a0911410128
tag:         tip
user:        Lasse V. Karlsen 
date:        Wed Dec 01 21:48:54 2010 +0100
summary:     Unicode:æøåÆØÅ

If I redirect the output of hg log to a file, and open it up, æøåÆØÅ is reproduced correctly.

So, my question is this:

  • Can I ask hg to write the log to a file directly, or do I have to redirect standard output?
  • Will this cause problems with python encoding for console, ie. some characters will make hg crash instead of just mangling the output?
  • Is there a known supported encoding for the commit messages that I should adhere to?

Or is it just this simple:

  • Mercurial doesn’t care, it takes the contents of the file I give it, whatever the content, and stores that as the commit message. When producing the log, it will just dump it back to the console falling prey to whatever limitations the Python console output library has in this regard?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:55:27+00:00Added an answer on May 18, 2026 at 10:55 am

    The following may not solve the issue but can help debug it.

    Check out : https://www.mercurial-scm.org/wiki/EncodingStrategy

    If I redirect the output of hg log to a file, and open it up, æøåÆØÅ is reproduced correctly.

    So at least mercurial is storing the commit information correctly. It is only the output that is messed up.

    Some work happening along these lines but not related to this

    • http://bitbucket.org/mg/hg-unicode

    [Edit: Missed the fact that you are on windows]

    See the last paragraph on how to deal with character set compatibility problems: https://www.mercurial-scm.org/wiki/CharacterEncodingOnWindows

    It says:

    • set your console code page to match your system code page
    • override Mercurial’s encoding with an environment variable
      • Setting HGENCODING will override the detected system character set.
    • override Mercurial’s encoding with a command-line option
      • Using the global –encoding option will allow you to set your preferred encoding on each command.
    • use GUI-based tools to interact with Mercurial
      • This also eliminates the problem, by eliminating that pesky console entirely.
    • use Linux/UNIX and UTF-8
      • This makes Bill Gates cry.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just tried to execute a small Lua script, but unfortunately I'm doing something wrong.
Tried something like this: HttpApplication app = s as HttpApplication; //s is sender of
I tried scouring the web for help on this issue, but there are so
I tried but I guess Message Box only works with win forms. What is
Tried to map it from Preferences -> Settings -> Keyboard, but the key combo
I tried to install Delphi 7 on Vista several times and Vista prevented me
I tried recently to use NAnt (beta 0.86.2962.0) to run some unit tests compiled
I tried to package a Twisted program with py2exe, but once I run the
I tried x = y ** e, but that didn't work.
I'm getting pretty tired of my development box dying and then I end up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.