delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/06/20/14:14:51

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:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=MplUqYJO4UAg4rDM
KXJAA1ZgPVUrOUFQbVmq7MmLMnZjS1ch98ZqbWRuModcdsCBZcQ2EBUUV7jIjZcd
UBVmbzVGdDPtFxzflJPy9ycSflKcPJpjgnjhoI3fvHO54PGC87Av7OXvoUBJAoOQ
+Jdf4pYE3ywZsYV/LttcShSsqpQ=
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:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=1e//4I9p9PaoJsybSdPvv1
gj2p8=; b=qhYLImik7LX4h5CciBL2DlrN4SfWquR2Mlc0ysIXE9d8+6QKkoJjQx
4OQ4Y3NWTBa6WgFjxoMFhoMzkI1UoOTqz3MiAX+u2x/Bj4tCIMLoBaRERo7UcPJx
e652M9rx0rf0KWYGHNkTYGWIO1CWATy0TisfNLf9pUQ25poVCWNPI=
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=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*sw, Unicode, HContent-Transfer-Encoding:8bit
X-HELO: v2201612906741603.powersrv.de
Subject: Re: UTF-8 character encoding
To: cygwin AT cygwin DOT com
References: <CAD8GWss253v-p+FjeonEqibr53v6wZRCQ+NWxBhb0LimQaM4sQ AT mail DOT gmail DOT com>
From: Stefan Weil <sw AT weilnetz DOT de>
Message-ID: <55da3c89-7419-060f-4370-7ed1ba2dd5e8@weilnetz.de>
Date: Wed, 20 Jun 2018 20:14:26 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <CAD8GWss253v-p+FjeonEqibr53v6wZRCQ+NWxBhb0LimQaM4sQ@mail.gmail.com>
X-IsSubscribed: yes

Am 20.06.2018 um 20:09 schrieb Lee:
> I'm looking at
>   https://cygwin.com/packaging-hint-files.html#pvr.hint
> and it starts off with
>   Use UTF-8 character encoding.
> 
> How do I do that and how do I check that I actually did use UTF-8
> character encoding _without_ using file?
> 
> for whatever it's worth:
> $ file unicode.html
> unicode.html: HTML document, UTF-8 Unicode text
> 
> $ file test.c
> test.c: C source, ASCII text
> 
> I used vi to create both files & I'd like to understand why file says
> one is ascii & the other is utf-8
> 
> Thanks,
> Lee

ASCII is a subset of UTF-8, so that's fine.

The file command will report ASCII as long as your text does not contain
any non-ASCII characters. If you add some (for example ÄÖÜ), it should
report UTF-8.

Regards,
Stefan


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