unicode - Mercurial commit messages and log, what encoding is supported, does Hg care at all? -
i tried doing simple commit through wrapper library mercurial, using simple text of unicode:æøåÆØÅ
commit message. written text file , given mercurial appropriate parameter:
hg commit --logfile file
if subsequently @ repository tortoisehg, characters reproduced correctly. on console, 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 redirect output of hg log
file, , open up, æøåÆØÅ
reproduced correctly.
so, question this:
- can ask
hg
write log file directly, or have redirect standard output? - will cause problems python encoding console, ie. characters make
hg
crash instead of mangling output? - is there known supported encoding commit messages should adhere to?
or simple:
- mercurial doesn't care, takes contents of file give it, whatever content, , stores commit message. when producing log, dump console falling prey whatever limitations python console output library has in regard?
the following may not solve issue can debug it.
check out : https://www.mercurial-scm.org/wiki/encodingstrategy
if redirect output of hg log file, , open up, æøåÆØÅ reproduced correctly.
so @ least mercurial storing commit information correctly. output messed up.
some work happening along these lines not related this
[edit: missed fact on windows]
see last paragraph on how deal character set compatibility problems: https://www.mercurial-scm.org/wiki/characterencodingonwindows
it says:
- set console code page match system code page
- override mercurial's encoding environment variable
- setting hgencoding override detected system character set.
- override mercurial's encoding command-line option
- using global --encoding option allow set preferred encoding on each command.
- use gui-based tools interact mercurial
- this eliminates problem, eliminating pesky console entirely.
- use linux/unix , utf-8
- this makes bill gates cry.
Comments
Post a Comment