Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

13. ... r-q1


devel / comp.lang.c / what is the value of 'ç' in C?

SubjectAuthor
* what is the value of 'ç' in C?Thiago Adams
+- Re: what is the value of 'ç' in C?Öö Tiib
+- Re: what is the value of 'ç' in C?Ben Bacarisse
`- Re: what is the value of 'ç' in C?Michael S

1
what is the value of 'ç' in C?

<cc6cb923-8807-4693-805c-42a749a754e7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28325&group=comp.lang.c#28325

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1922:b0:410:a9dd:9fe4 with SMTP id w34-20020a05622a192200b00410a9dd9fe4mr913866qtc.1.1693241665992;
Mon, 28 Aug 2023 09:54:25 -0700 (PDT)
X-Received: by 2002:a17:903:187:b0:1ae:7604:d65c with SMTP id
z7-20020a170903018700b001ae7604d65cmr10368664plg.0.1693241665398; Mon, 28 Aug
2023 09:54:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 28 Aug 2023 09:54:24 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=170.231.44.126; posting-account=xFcAQAoAAAAoWlfpQ6Hz2n-MU9fthxbY
NNTP-Posting-Host: 170.231.44.126
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cc6cb923-8807-4693-805c-42a749a754e7n@googlegroups.com>
Subject: what_is_the_value_of_'ç'_in_C?
From: thiago.a...@gmail.com (Thiago Adams)
Injection-Date: Mon, 28 Aug 2023 16:54:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1831
 by: Thiago Adams - Mon, 28 Aug 2023 16:54 UTC

"The literal encoding is an implementation-defined mapping of the characters of the execution character
set to the values in a character constant (6.4.4.4) or string literal (6.4.5). It shall support a mapping
from all the basic execution character set values into the implementation-defined encoding. It may
contain multibyte character sequences (5.2.1.1)."

It can be anything? "implementation-defined"

If the source is encoded with utf8 it is like a multi char in gcc.
warning: multi-character character constant [-Wmultichar]
value is 50087

clang has an error message
error: character too large for enclosing character literal type

Could a compiler return 'ç' 231 that is the unicode value? considering " implementation-defined mapping"

Re: what is the value of 'ç' in C?

<fce42ce9-72d4-4790-abd5-02e12dd6e13dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28348&group=comp.lang.c#28348

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:4c1d:b0:63c:ebe9:2467 with SMTP id qh29-20020a0562144c1d00b0063cebe92467mr758699qvb.13.1693258224150;
Mon, 28 Aug 2023 14:30:24 -0700 (PDT)
X-Received: by 2002:a05:6a00:998:b0:68a:667d:229f with SMTP id
u24-20020a056a00099800b0068a667d229fmr7036717pfg.2.1693258223890; Mon, 28 Aug
2023 14:30:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 28 Aug 2023 14:30:23 -0700 (PDT)
In-Reply-To: <cc6cb923-8807-4693-805c-42a749a754e7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=145.14.19.203; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 145.14.19.203
References: <cc6cb923-8807-4693-805c-42a749a754e7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fce42ce9-72d4-4790-abd5-02e12dd6e13dn@googlegroups.com>
Subject: Re:_what_is_the_value_of_'ç'_in_C?
From: oot...@hot.ee (Öö Tiib)
Injection-Date: Mon, 28 Aug 2023 21:30:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2463
 by: Öö Tiib - Mon, 28 Aug 2023 21:30 UTC

On Monday, 28 August 2023 at 19:54:33 UTC+3, Thiago Adams wrote:
> "The literal encoding is an implementation-defined mapping of the characters of the execution character
> set to the values in a character constant (6.4.4.4) or string literal (6.4.5). It shall support a mapping
> from all the basic execution character set values into the implementation-defined encoding. It may
> contain multibyte character sequences (5.2.1.1)."
>
> It can be anything? "implementation-defined"
>
Implementation-defined means that a conforming implementation must define it somewhere.

> If the source is encoded with utf8 it is like a multi char in gcc.
> warning: multi-character character constant [-Wmultichar]
> value is 50087
>
Unicode defines it as letter (U+00E7) with two byte UTF-8 encoding 0xC3 0xA7. 0xc3a7 is
indeed 50087.

> clang has an error message
> error: character too large for enclosing character literal type
>
> Could a compiler return 'ç' 231 that is the unicode value? considering " implementation-defined mapping"

Compiler may, but I've not seen one to define it like that.
On some wchar_t c = L'ç'; will result with c having wchar_t value 231.

Re: what is the value of 'ç' in C?

<87ledun8vx.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28351&group=comp.lang.c#28351

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: what is the value of 'ç' in C?
Date: Mon, 28 Aug 2023 22:40:18 +0100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <87ledun8vx.fsf@bsb.me.uk>
References: <cc6cb923-8807-4693-805c-42a749a754e7n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="1c35b718727ecba87d6437feb1cbcad9";
logging-data="1980276"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cSVMNOXzi3f5+4QsvZ8B3QOKN+F84AcA="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:wkDpztNZZwWtH2ElMHbMcnT28RY=
sha1:7kjLvQvWTFx/Xcn4bpzckY/m0bo=
X-BSB-Auth: 1.f4c4443ac54497e413a6.20230828224018BST.87ledun8vx.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 28 Aug 2023 21:40 UTC

Thiago Adams <thiago.adams@gmail.com> writes:

> "The literal encoding is an implementation-defined mapping of the
> characters of the execution character set to the values in a character
> constant (6.4.4.4) or string literal (6.4.5). It shall support a
> mapping from all the basic execution character set values into the
> implementation-defined encoding. It may contain multibyte character
> sequences (5.2.1.1)."
>
> It can be anything? "implementation-defined"

Pretty much anything, though there are some results that are more
helpful and thus likely than others.

> If the source is encoded with utf8 it is like a multi char in gcc.
> warning: multi-character character constant [-Wmultichar]
> value is 50087

If you want a Unicode char, use u'ç'.

> clang has an error message
> error: character too large for enclosing character literal type
>
> Could a compiler return 'ç' 231 that is the unicode value? considering
> " implementation-defined mapping"

You (well I) can have 'ç' == 231 by compiling with

gcc -fexec-charset=iso-8859-1 -funsigned-char ...

my gcc lets me choose the execution character set.

--
Ben.

Re: what is the value of 'ç' in C?

<3514ab42-e945-44f7-9087-f53c3711b3e5n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28404&group=comp.lang.c#28404

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1984:b0:411:fa3c:358e with SMTP id u4-20020a05622a198400b00411fa3c358emr821686qtc.13.1693309484372;
Tue, 29 Aug 2023 04:44:44 -0700 (PDT)
X-Received: by 2002:ad4:4b6e:0:b0:63f:bde6:2f5d with SMTP id
m14-20020ad44b6e000000b0063fbde62f5dmr820403qvx.0.1693309484155; Tue, 29 Aug
2023 04:44:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 29 Aug 2023 04:44:43 -0700 (PDT)
In-Reply-To: <cc6cb923-8807-4693-805c-42a749a754e7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=199.203.251.52; posting-account=ow8VOgoAAAAfiGNvoH__Y4ADRwQF1hZW
NNTP-Posting-Host: 199.203.251.52
References: <cc6cb923-8807-4693-805c-42a749a754e7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3514ab42-e945-44f7-9087-f53c3711b3e5n@googlegroups.com>
Subject: Re:_what_is_the_value_of_'ç'_in_C?
From: already5...@yahoo.com (Michael S)
Injection-Date: Tue, 29 Aug 2023 11:44:44 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1155
 by: Michael S - Tue, 29 Aug 2023 11:44 UTC

nothing

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor