help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Emacs24.3.92(and 24.3): Japanese commit log is garble with VC-git


From: Kentaro NAKAZAWA
Subject: Emacs24.3.92(and 24.3): Japanese commit log is garble with VC-git
Date: Thu, 10 Jul 2014 17:31:09 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (windows-nt)

Hello.

Japanese commit log is always garble with VC-git.
The cause is because the argument of the Japanese was not passed well in 
command.

I created a C program for checking.
----- test_args.c -----
#include <stdio.h>
#include <string.h>

int main(int argc, char* argv[])
{
  if (argc > 1) {
    int i;
    printf("%s\n", argv[1]);

    for (i = 0; i <= strlen(argv[1]); ++i) {
      printf("0x%x, ", (unsigned char)argv[1][i]);
    }
    printf("\n");
  }

  return 0;
}
-----------------------
$ gcc test_args.c
$ ./a.exe abc
abc
0x61, 0x62, 0x63, 0x0, 

$ emacs.exe -Q     <- 24.3.92 or 
24.3(http://ftp.gnu.org/gnu/emacs/windows/emacs-24.3-bin-i386.zip)

and exec shell-mode and input Japanese character with LEIM.

M-x shell
>a.exe 語     <- '語'(go) is 3bytes character. UTF-8 character code is [0xe8, 
>0xaa, 0x9e].
誁E
0xe8, 0xaa, 0x81, 0x45, 0x0,     <- why 4bytes ???

M-x eshell
$ ./a.exe 語
隱
0xe8, 0xaa, 0x0,     <- why 2bytes ??? garbled git commit log is this pattern.

Please check attached PNG image.

Is this a bug?

Attachment: garbled.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]