can't commit because of some utf-8? chars

Tony Mechelynck antoine.mechelynck at gmail.com
Sun Feb 28 20:37:04 UTC 2021


On Sun, Feb 28, 2021 at 9:19 PM Uwe Brauer <oub at mat.ucm.es> wrote:
>
>
> > On Sun, Feb 28, 2021 at 7:37 PM Uwe Brauer <oub at mat.ucm.es> wrote:
>
> > Wrong charset. The "strange" character is the ö of Nordström which is
> > codepoint U+00F6, i.e. byte 0xF6 in Latin1 but byte sequence 0xC3 0xB6
> > in UTF-8.  0xF6 followed by 0x6D (i.e. "m") is an illegal sequence in
> > UTF-8.
>
> Thanks but I am confused. Using UTF8 coding always in Emacs, I typed
> Nordström, so you are saying it somehow got corrupted?
> or are you saying I cannot type öm in UFT8? which would be odd.
>
> In any case thanks for the clarification.
>
> Uwe

I'm saying that Mercurial got "Nordström" in Latin1 aka ISO-8859_1
while it was expecting something in UTF-8. Now codepoints U+0000 to
U+007F are represented identically in all three of US-ASCII, Latin1
and UTF-8. Codepoints U+0080 to U+00FF don't exist in US-ASCII, and in
Latin1 and UTF-8 they have the same scalar ordinal but not the same
representation. So when Mercurial got something which is not a valid
byte sequence in UTF-8 it hiccuped. (Maybe you know all this but I'm
repeating it just in case.)

Best regards,
Tony.



More information about the Mercurial mailing list