Re: Need multibyte advice - Shift-JIS

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

 



Am 27.02.19 um 19:50 schrieb Randall S. Becker:
> On February 27, 2019 13:18, Michal Suchánek wrote:
>> What are your requirements, exactly?
> Source code and comments contain SJIS content. The requirement is to
> be able to move seamlessly in and out of git, and have git show/diff/log
> display SJIS as well as ASCII content. How that happens is open. The
> UTF-16 is a red-herring, only as an attempt at getting at SJIS content
> differently than the limitation imposed by less.

When your file content contains ShiftJIS, you should set an attribute in
.gitattributes:

*.sourcecode	encoding=ShiftJIS

When your git commits messages contain ShiftJIS, you should configure

 git config i18n.commitEncoding ShiftJIS

More precisely, this assumes that your editor that composes to commits
messages writes the .git/COMMIT_MSG in ShiftJIS.

When your terminal or pager is configured that it interprets the byte
stream that it receives from applications for display as ShiftJIS, then
you should configure

 git config i18n.logOutputEncoding ShiftJIS

You can set this independently from the other settings. In particular,
when it is not set, UTF-8 is assumed. That is, if your terminal or pager
supports UTF-8, you should *NOT* set this configuration (or set it to
UTF-8).

And, of course, you must have built Git with iconv, which must have
support for ShiftJIS.

-- Hannes



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux