all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Filipp Gunbin <fgunbin@fastmail.fm>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Grep Japanese characters
Date: Mon, 16 Jul 2018 23:11:36 +0300	[thread overview]
Message-ID: <m2va9fj5zb.fsf@fgunbin.playteam.ru> (raw)
In-Reply-To: <83lgafcidq.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 Jul 2018 17:36:33 +0300")

On 13/07/2018 17:36 +0300, Eli Zaretskii wrote:

>> From: Filipp Gunbin <fgunbin@fastmail.fm>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Fri, 13 Jul 2018 17:06:38 +0300
>>
>> > The conclusion is that UTF-8 can be used as a locale's codeset
>> > (good!), but sending UTF-8 text to the console still doesn't work well
>> > (not so good).  So if people use this knob in Windows 10, they should
>> > arrange for console input and output to be in some codepage other than
>> > 65001 (a.k.a. UTF-8).
>> [..]
>>
>> But in message <86pnzsbnvu.fsf@misasa.okayama-u.ac.jp> above it was
>> reported that grepping of these non-ascii chars worked from emacs, no?
>
> When you gerp from Emacs, the results of the search are not displayed
> by the Windows console, they get read by Emacs and displayed by Emacs.
> And (GUI) Emacs can display _any_ character supported by the fonts
> installed on the systems, regardless of the codepage.  But if people
> run Grep from the shell prompt, they will see unreadable output, even
> on Windows 10 with that setting in effect.
>
>> And what does "using as locale's codeset" then means in your message?
>
> A locale's most general specification is ll_CC.ENC, where ll is the
> language, CC is the country, and ENC is the encoding.  Example from
> Posix systems: pr_BR.UTF-8, for Brazilian variety of Portuguese with
> UTF-8 encoding.  Example from Windows: French_Canada.1252 (where 1252
> is the codepage used for encoding).  The ENC part is also known as
> "codeset".
>
> More about that, for Windows in particular, here:
>
>   https://msdn.microsoft.com/en-us/library/x99tb11d.aspx
>
> You will see that the MS doc still says UTF-8 is not supported as the
> ENC part.

Thanks.  I'm familiar with locale concept, but was not sure about what
"codeset" means.

I'm still a bit lost in this.  It seems that sending/receiving to/from
subprocesses works with that Win10 setting, that's why grepping from M-x
shell started to work.  Output in graphical Emacs will work if font is
ok.

But the interactions with console confuse me, I guess I need to read
more on that before I am able to ask something meaningful.  In
particular, it's unclear to me why grep outputs Japanese correctly in
the OP (with LC_ALL=en_US.UTF-8), and you say that sending UTF-8 text to
console will not work.



  reply	other threads:[~2018-07-16 20:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 23:02 Grep Japanese characters Tak Kunihiro
2018-07-12  2:40 ` Eli Zaretskii
2018-07-12  3:05   ` YUE Daian
2018-07-12 13:10     ` Tak Kunihiro
2018-07-12 13:37       ` Eli Zaretskii
2018-07-13  3:36         ` Tak Kunihiro
2018-07-13  7:21           ` Eli Zaretskii
2018-07-13 14:06             ` Filipp Gunbin
2018-07-13 14:36               ` Eli Zaretskii
2018-07-16 20:11                 ` Filipp Gunbin [this message]
2018-07-17  2:29                   ` Eli Zaretskii
2018-07-13  2:58       ` YUE Daian
2018-07-12 13:23     ` Eli Zaretskii
2018-07-12  5:05   ` Yuri Khan
2018-07-12 13:27     ` Eli Zaretskii

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=m2va9fj5zb.fsf@fgunbin.playteam.ru \
    --to=fgunbin@fastmail.fm \
    --cc=eliz@gnu.org \
    --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.