From: Eli Zaretskii <eliz@gnu.org>
To: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
Cc: 23076@debbugs.gnu.org
Subject: bug#23076: 24.5; vc-git: add a new variable for log output coding system
Date: Sat, 09 Apr 2016 15:50:04 +0300 [thread overview]
Message-ID: <83egafhrpf.fsf@gnu.org> (raw)
In-Reply-To: <5708F5CA.3080509@gmail.com> (message from Nikolay Kudryavtsev on Sat, 9 Apr 2016 15:30:02 +0300)
> From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
> Cc: 23076@debbugs.gnu.org
> Date: Sat, 9 Apr 2016 15:30:02 +0300
>
> My suggestion was based on the idea that introducing a new variable is
> guaranteed to not break anyone's setup.
>
> Solution 1 seems to be more dangerous in this regard.
How can it break someone's setup, if using the current system codepage
is the _only_ way of invoking programs from Emacs on MS-Windows? If
someone has setup that doesn't already follow this, their setup is
already broken.
> Also #1 seems inferior to #2 for this case - what if you don't have
> control over system non-Unicode encoding?
Are we talking about MS-Windows here? If so, no control of
non-Unicode encoding is needed, we only need to _obey_ that encoding.
Emacs always knows what that encoding is, so we just need to use it.
Am I missing something?
> Let's say someone wants to commit org-mode notes in his native
> language, from a workplace, where he has no admin rights for the
> machine and no ability to change that windows setting. That's
> probably a rare case, but still, seems like something that may
> happen.
The solutions I proposed don't require changing any system-wide
settings. They just _use_ the _existing_ settings to encode non-ASCII
characters passed to Git via its command-line arguments.
Submitting the commit message via a temporary file doesn't need to use
the system codepage, it should use UTF-8, which allows to use almost
any character in any language.
> I also did some testing of #2 and noted this thing - the current git
> behaves somewhat weirdly in regards with git commitencoding and message
> files. That is:
> 1. Let's say your message.txt is encoded in windows-1251. Trying to
> commit it with "git commit -F message.txt" would result in a broken
> commit and this:
> > Warning: commit message did not conform to UTF-8.
> > You may want to amend it after fixing the message, or set the config
> > variable i18n.commitencoding to the encoding your project uses.
Files submitted via -F should always be in UTF-8. If we adopt #2,
Emacs will encode the message in UTF-8 when it writes the file which
will then be submitted to Git via -F.
> 2. Let's try doing so and set commitencoding to windows-1251 and commit
> again. Now we get no warning, but our message is a badly coded mess,
> though differently from the previous step, so it did something extra
> while encoding the message.
> 3. Even when our commitencoding = windows-1251 committing message.txt in
> utf-8 works fine.
>
> So, it seems like we want to always use utf-8 for messages.
Yes, and that's what I had in mind for alternative #2.
So given these clarifications, which alternative is preferable, in
your opinion?
next prev parent reply other threads:[~2016-04-09 12:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 11:51 bug#23076: 24.5; vc-git: add a new variable for log output coding system Nikolay Kudryavtsev
2016-03-21 19:01 ` Nikolay Kudryavtsev
2016-04-02 10:16 ` Eli Zaretskii
2016-04-03 20:34 ` Nikolay Kudryavtsev
2016-04-04 15:22 ` Eli Zaretskii
2016-04-08 8:23 ` Eli Zaretskii
2016-04-09 12:30 ` Nikolay Kudryavtsev
2016-04-09 12:50 ` Eli Zaretskii [this message]
2016-04-09 14:14 ` Nikolay Kudryavtsev
2016-04-09 14:48 ` Eli Zaretskii
2016-04-10 16:10 ` Eli Zaretskii
2016-04-11 22:12 ` Nikolay Kudryavtsev
2016-04-12 15:07 ` Nikolay Kudryavtsev
2016-04-12 15:22 ` Eli Zaretskii
[not found] <acdfa136-1d37-a920-b572-fdd0f6e11257@gmail.com>
[not found] ` <837fch1vmw.fsf@gnu.org>
2016-07-25 18:46 ` Nikolay Kudryavtsev
2016-07-25 19:10 ` Eli Zaretskii
2016-07-26 19:01 ` Michael Albinus
2016-07-27 2:36 ` Eli Zaretskii
2016-08-07 12:08 ` Michael Albinus
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=83egafhrpf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=23076@debbugs.gnu.org \
--cc=nikolay.kudryavtsev@gmail.com \
/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.