all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kentaro NAKAZAWA <kentaro.nakazawa@nifty.com>
To: help-gnu-emacs@gnu.org
Subject: Emacs24.3.92(and 24.3): Japanese commit log is garble with VC-git
Date: Thu, 10 Jul 2014 17:31:09 +0900	[thread overview]
Message-ID: <87k37ly5rm.fsf@nifty.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]

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 #2: garbled.png --]
[-- Type: image/png, Size: 47426 bytes --]

                 reply	other threads:[~2014-07-10  8:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k37ly5rm.fsf@nifty.com \
    --to=kentaro.nakazawa@nifty.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.