On Thu, 31 Oct 2013 10:51:11 +0000
Roddie Grant <gitl...@myword.co.uk> wrote:
> >> When I do git diff in Terminal I get output like:
> >> -<p><E2><80><9C>SurfexPlus<E2><80><9D> is OCCA<E2><80><99>s
> > Care to tell us which OS is that?
> > Another question: do you see this in a pager or plainly rendered by
> > the terminal emulator?
> > Another question (if this really happens on a Mac): what does
> > `locale` run in that terminal emulator tell to you?
> I'm definitely out of my depth here :-( but the answers are the
> webserver is Linux (CentOS Linux 4.9), and I'm using my MacBook
> (10.6.8) to connect to it with ssh.
> There is a pager running in the Mac Terminal app. I usually get ":"
> (which means hit spacebar to scroll) or "END".
Ah, yes, this means Git spawned "less"  -- a popular and rather
advanced pager program.
> 'locale' when ssh-ed to the server returns
This is of no relevance to your problem: Git generates and shows you the
diff on your local machine, the server is not involved with this in any
> 'locale' on the Mac returns
This looks perfectly reasonable so we should conclude you have no
problems with your locale.
OK, now let's try a couple of things:
1) If you run `git diff --no-pager ...` so that the output goes plainly
into the hands of Terminal and rendered by it directly, do you see
those non-ASCII characters OK?
If this works for you, `less` is the culprit so read on.
2) Try setting the LESSCHARSET environment variable to "utf-8".
You can do this for the current Terminal session by executing
in it before running any `git diff` command.
If this fixes the problem for you, consider making this setting
persistent (for your user or system-wide). How exactly to do that,
I don't know (I lack experience with Macs), so try googling for
mac+os+set+environment+variable+permanently or may be someone
here will suggest a solution off-hand.
3) Try playing with the LESS environment variable (which, if exists,
contains a set of command-line options for `less` to consume as if
they vere explicitly passed to it). The command-line option of
interest are "-R" (better) or "-r" (worse). Also "-X" might be of
relevance (though I doubt it).
So try doing:
and then running `git diff` to see if this helps.
If this leads to no positive result, try `export LESS=-r` or try
combining "-r" and "-R" with "-X", like in `export LESS=-RX`.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/groups/opt_out.