public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Need help with multibyte UTF-8 characters
Date: Tue, 05 Dec 2017 03:48:00 -0000	[thread overview]
Message-ID: <3317b062-e0b1-03dd-b289-97823217dd27@SystematicSw.ab.ca> (raw)
In-Reply-To: <626a3c06-e9f2-1932-f1f3-47ddb2051215@gmail.com>

On 2017-12-04 18:23, Thomas Taylor wrote:
> I want to use multibyte UTF-8 characters in 64-bit Cygwin under Windows 7.  The
> "vim" editor running in mintty displays the two-byte characters correctly, but
> not the three- (and I assume four-) byte characters, which instead display as
> rectangular filled-in blocks.  The "less" program doesn't even display two-byte
> characters correctly, but instead displays them as <A1> to <FF>, depending on
> the character in question, in reverse color in the terminal window.  The "cat"
> program is even worse, replacing every two-byte character with a character that
> looks like three horizontal bars stacked one above the other.  I've read the
> "Internationalization" page in the Cygwin online manual, but am still baffled. 
> My LANG environment variable is set to "en_US.UTF-8".  Can anyone help?

Check mintty/Options/Text/Locale[en_US]/Character set[UTF-8]/Apply/Save.
Then exit and restart mintty and your shell.

To see what locale Cygwin thinks you are set to, run:
	$ locale

To check all Windows locale settings, you can run:
	$ for o in -s -u -n -i -f ''; do locale $o; done

The first two should show your Windows install locale, the rest should show
anything you have set up, or the same locale.
If any settings don't match LANG, you may have to set LC_ALL=$LANG to force the
setting.
I use the following profile stanza across all systems for consistency:

# Set user-defined locale - use regional settings if available
locale -fU > /dev/null 2>&1     \
        && LC_ALL=`locale -fU`  \
        || LC_ALL=`locale |	\
		/bin/sed '/^LANG=\|^LC_CTYPE=\|^LC_ALL=/{s///;h};$!d;x;s/"//g'`
export LC_ALL

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2017-12-05  3:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05  1:24 Thomas Taylor
2017-12-05  3:48 ` Brian Inglis [this message]
2017-12-12  3:43 ` Thomas Taylor
2017-12-12 20:00   ` Doug Henderson
2017-12-12 20:17   ` Thomas Taylor
2017-12-14 19:50     ` Andrey Repin
2017-12-15  2:51     ` Brian Inglis
2017-12-16  1:50       ` Thomas Wolff
2017-12-13  3:06   ` Thomas Wolff
2017-12-14 19:32   ` Brian Inglis
2017-12-13 13:07 ` Brian Inglis
2017-12-13 13:28   ` Thomas Wolff
2017-12-14  1:15     ` cyg Simple
2017-12-14  7:36     ` Brian Inglis
2017-12-14 16:21       ` Thomas Wolff
2017-12-14 18:09         ` cyg Simple
2017-12-14 19:20           ` Thomas Wolff
2017-12-14 16:55       ` cyg Simple

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=3317b062-e0b1-03dd-b289-97823217dd27@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --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).