delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/12/13/11:19:32

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:reply-to:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=fQjiv6cSbVUqUpL2
GkEUEAjfoP9Qj4iriUOqa4Zl/lyabo3gBI0k/B+O+D/G31aPmKz8HPcCrNJITgCp
3/JwROzpn2xkLhAP3pXuaNaY/BW1pQ1QHHSmDkk9gUijzsLVnrKRNwpuVxjPoy8q
EixWPSVWS628Nie15y09rIvMitY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:reply-to:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=SfthhGlGGpAQJCEq6FGKXG
gUPII=; b=GjQylG9cSyx8+bZhTcRUS/40RsrKyGlr8Po9mAY5QpDkp/2ykFLDKM
NHZXkemhGAlxykhiZQON3tIoVVR0lqevIhmWXRHFcuZr0wRSOrtqLcAL8TP1AO+b
IGH4LIj2R0mF/zOkHDyLmOhcVfSpHHT3e3aYU9/lBms2OoghoUFW0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.0 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,LIKELY_SPAM_SUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB,SPF_PASS autolearn=no version=3.3.2 spammy=ISO-8859-1, ISO88591, bars, filled-in
X-HELO: mail-it0-f45.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:reply-to:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4O2FHwMv/Jwgis8jWneP7t+O2+HvHf0xglj7DAiEvhw=; b=bHAWokDWF1qapChmMi6Lf9nbyMQyCjq6q9GntRVmlF2dL/TJatiM92yFaQU+o40Mb2 BTIVIZJHJTUC1sfryJcd3Iz/Leg5UB4gEdunX3r7taXm389IY/dqCwEbHCRa7g9uvstj zyfTpOGgYKF9TsCPUmnRFyKmsjHGJPEL4E3EhfVxqvikq1gihNPGUL8ppNiX1birqV/9 Gv1q37Mbyt9S7zP8Ih+wv7oibOHdJ0dzS3P2zyDUuT6MjfRV6TwsNhBGx722Fjq6Ti9Y eq2WzO+518UJ+fI1KNgEskh8gs2jWd+KPUTaH6LTMiPqhR0s6Z9CCTxywRUt/g+g3jlO cykg==
X-Gm-Message-State: AKGB3mIE1PYBSMrHt0RMS1odi7+NTrz6Y8PS3rqJq559R9R8ni9SGVml D8+55c+Mhzqch4bFI73U5p99nQ==
X-Google-Smtp-Source: ACJfBou7s1DV2vh1ryR0rc+U+oTUGa5yg5NJBY1e0+FZsCUcBcZ2RZMHSAshTvUiIFDx/qzTNZ0s9g==
X-Received: by 10.36.254.71 with SMTP id w68mr3557669ith.24.1513181956991; Wed, 13 Dec 2017 08:19:16 -0800 (PST)
Subject: Re: Need help with multibyte UTF-8 characters
To: cygwin AT cygwin DOT com
References: <626a3c06-e9f2-1932-f1f3-47ddb2051215 AT gmail DOT com> <b190e8bc-a60e-2a30-5caa-a2f67a0b91ce AT SystematicSw DOT ab DOT ca> <89a7d883-e3e5-42d7-2d22-020cdf6ccbdf AT towo DOT net>
Reply-To: cygwin AT cygwin DOT com
From: cyg Simple <cygsimple AT gmail DOT com>
Message-ID: <612abfaf-1d20-a36e-c26d-51708bf39c96@gmail.com>
Date: Wed, 13 Dec 2017 11:19:13 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <89a7d883-e3e5-42d7-2d22-020cdf6ccbdf@towo.net>
X-IsSubscribed: yes
Note-from-DJ: This may be spam

On 12/13/2017 2:50 AM, Thomas Wolff wrote:
> Hi Brian,
> 
> Am 13.12.2017 um 06:21 schrieb Brian Inglis:
>> 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?
>> Your Windows Regional settings and your mintty/Options/Text/Language and
>> Character Set should be set to match.
>> The profile commands below set Cygwin locale to your Windows Regional
>> settings
>> and charset to UTF-8, or Unix locale to your system locale.
>> Otherwise your system or mintty is going to be doing conversions on
>> each character.
> I am not aware that mintty character display and Windows regional
> settings would interfere in any way you indicated.
> Can you elaborate on this please?
> Thomas
> 
>> # Set user-defined locale
>> locale -fU > /dev/null 2>&1     \
>>          && LC_ALL=$(locale -fU) \
>>          || LC_ALL=$(locale |    \
>>                  sed
>> '/^LANG=\|^LC_CTYPE=\|^LC_ALL=/{s///;h};$!d;x;s/"//g')
>>

I was having an issue with git changing the locale of the files from
ISO-8859-1 to UTF-8 because of this.  I modified my $HOME/.profile and
changed:

# Set user-defined locale
export LANG=$(locale -uU)

to:

# Set user-defined locale
export LANG=$(locale -u).ISO-8859-1

which sets all of the locale within Cygwin except for LC_ALL.

$ locale
LANG=en_US.ISO-8859-1
LC_CTYPE="en_US.ISO-8859-1"
LC_NUMERIC="en_US.ISO-8859-1"
LC_TIME="en_US.ISO-8859-1"
LC_COLLATE="en_US.ISO-8859-1"
LC_MONETARY="en_US.ISO-8859-1"
LC_MESSAGES="en_US.ISO-8859-1"
LC_ALL=
$

-- 
cyg Simple

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019