public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Michael Shay" <MShay@ABINITIO.COM>
To: cygwin@cygwin.com
Subject: Re: Trouble with character sets
Date: Mon, 3 Aug 2020 14:15:35 -0400	[thread overview]
Message-ID: <OFE3254EC7.619839E9-ON852585B9.00644343-852585B9.00644DD3@abinitio.com> (raw)
In-Reply-To: <1314865780.20200803204249@yandex.ru>

Michael



From:   "Andrey Repin" <anrdaemon@yandex.ru>
To:     "Michael Shay" <MShay@ABINITIO.COM>, cygwin@cygwin.com
Date:   08/03/2020 02:06 PM
Subject:        Re: Trouble with character sets



Greetings, Michael Shay!

Please bottom post in this mailing list.

> Doesn't help. I tried 65001 (UTF-8):

Because you're confusing things.
chcp has nothing to do with LANG or LC_*.
Et vice versa.

chcp sets console code page for native console applications. Only for 
those
supporting it. Many do not.
LANG sets output parameters for Cygwin applications (and other programs 
that
look for it, but these are few).

> ### SET CP TO UTF-8, 65001
> $cygwin_charset_test.ksh
> Old CP 65001
> locale on entry
> LANG=
> LC_CTYPE="C.UTF-8"
> LC_NUMERIC="C.UTF-8"
> LC_TIME="C.UTF-8"
> LC_COLLATE="C.UTF-8"
> LC_MONETARY="C.UTF-8"
> LC_MESSAGES="C.UTF-8"
> LC_ALL=

> ### CP SET TO 65001
> Active code page: 65001
> locale changed to
> LANG=en_US.CP1252
> LC_CTYPE="en_US.CP1252"
> LC_NUMERIC="en_US.CP1252"
> LC_TIME="en_US.CP1252"
> LC_COLLATE="en_US.CP1252"
> LC_MONETARY="en_US.CP1252"
> LC_MESSAGES="en_US.CP1252"
> LC_ALL=en_US.CP1252

> Running WIN32 pgm
> Transcoding using Cygwin codepage: 1252
> Input widechar string:
>         lpw[0] = Z - 5A
>         lpw[1] =  - F0C7
> wmain: Z?
> Active code page: 65001

> and 1252

> ### SET CP TO 1252
> $cygwin_charset_test.ksh
> Old CP 65001
> locale on entry
> LANG=
> LC_CTYPE="C.UTF-8"
> LC_NUMERIC="C.UTF-8"
> LC_TIME="C.UTF-8"
> LC_COLLATE="C.UTF-8"
> LC_MONETARY="C.UTF-8"
> LC_MESSAGES="C.UTF-8"
> LC_ALL=

> ### CP SET TO 1252
> Active code page: 1252
> locale changed to
> LANG=en_US.CP1252
> LC_CTYPE="en_US.CP1252"
> LC_NUMERIC="en_US.CP1252"
> LC_TIME="en_US.CP1252"
> LC_COLLATE="en_US.CP1252"
> LC_MONETARY="en_US.CP1252"
> LC_MESSAGES="en_US.CP1252"
> LC_ALL=en_US.CP1252

> Running WIN32 pgm
> Transcoding using Cygwin codepage: 1252
> Input widechar string:
>         lpw[0] = Z - 5A
>         lpw[1] =  - F0C7
> wmain: Z?
> Active code page: 65001


-- 
With best regards,
Andrey Repin
Monday, August 3, 2020 20:36:16

Sorry for my terrible english...



Thanks for the feedback. I wasn't aware of the protocol.

Mike Shay


  
NOTICE  from Ab Initio: This email (including any attachments) may contain information that is subject to confidentiality obligations or is legally privileged, and sender does not waive confidentiality or privilege. If received in error, please notify the sender, delete this email, and make no further use, disclosure, or distribution.

  reply	other threads:[~2020-08-03 18:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 15:36 Michael Shay
2020-08-03 16:31 ` Brian Inglis
2020-08-03 17:10   ` Michael Shay
2020-08-03 17:42     ` Andrey Repin
2020-08-03 18:15       ` Michael Shay [this message]
2020-08-03 21:23       ` Trouble with output character sets from Win32 applications running under mintty Brian Inglis
2020-08-03 22:05         ` Michael Shay
2020-08-04 12:32           ` Trouble with output character sets from Win32 applications running under mksh Brian Inglis
2020-08-04 21:19             ` Michael Shay
2020-08-05  2:10               ` Thomas Wolff
2020-08-05  5:22               ` Brian Inglis

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=OFE3254EC7.619839E9-ON852585B9.00644343-852585B9.00644DD3@abinitio.com \
    --to=mshay@abinitio.com \
    --cc=cygwin@cygwin.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).