discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

chr(value) can have a range between 0-0x0010FFFF?

A
adrian
Sun, Nov 13, 2016 4:32 PM

I was playing around with chr() and found that there are characters that have
values between 0-1,114,111 (0-0x0010FFFF) but this  answer
http://stackoverflow.com/a/5928054/1366368  on SO says that there are
actually 0-1,111,998 (0-0x0010F7BE) characters.

Is this some sort of simplification?  What are the extra 2113 characters
for?

--
View this message in context: http://forum.openscad.org/chr-value-can-have-a-range-between-0-0x0010FFFF-tp19071.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I was playing around with chr() and found that there are characters that have values between 0-1,114,111 (0-0x0010FFFF) but this answer <http://stackoverflow.com/a/5928054/1366368> on SO says that there are actually 0-1,111,998 (0-0x0010F7BE) characters. Is this some sort of simplification? What are the extra 2113 characters for? -- View this message in context: http://forum.openscad.org/chr-value-can-have-a-range-between-0-0x0010FFFF-tp19071.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Sun, Nov 13, 2016 5:41 PM

On Nov 13, 2016, at 11:32, adrian adrianh.bsc@gmail.com wrote:

[…] but this  answer
http://stackoverflow.com/a/5928054/1366368  on SO says that there are
actually 0-1,111,998 (0-0x0010F7BE) characters.

That answer is from 2011.
Unicode evolves :)

-Marius

> On Nov 13, 2016, at 11:32, adrian <adrianh.bsc@gmail.com> wrote: > > […] but this answer > <http://stackoverflow.com/a/5928054/1366368> on SO says that there are > actually 0-1,111,998 (0-0x0010F7BE) characters. > That answer is from 2011. Unicode evolves :) -Marius
DM
doug moen
Sun, Nov 13, 2016 6:32 PM

The stack overflow answer says:
1,111,998: 17 planes × 65,536 characters per plane - 2048 surrogates - 66
noncharacters

This is correct.

The Unicode code points exist in the range 0 .. 0x10FFFF, which corresponds
to "17 planes x 65,536 code points per plane", or 1,114,112 possible code
points.

However, some of these available code point values are not valid. There are
2048 surrogates and 66 noncharacters, which correspond to holes in the code
point range. So the number of actual valid code points is less, it's
actually 1,111,998.
.
So, in theory,

On 13 November 2016 at 11:32, adrian adrianh.bsc@gmail.com wrote:

I was playing around with chr() and found that there are characters that
have
values between 0-1,114,111 (0-0x0010FFFF) but this  answer
http://stackoverflow.com/a/5928054/1366368  on SO says that there are
actually 0-1,111,998 (0-0x0010F7BE) characters.

Is this some sort of simplification?  What are the extra 2113 characters
for?

--
View this message in context: http://forum.openscad.org/chr-
value-can-have-a-range-between-0-0x0010FFFF-tp19071.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

The stack overflow answer says: 1,111,998: 17 planes × 65,536 characters per plane - 2048 surrogates - 66 noncharacters This is correct. The Unicode code points exist in the range 0 .. 0x10FFFF, which corresponds to "17 planes x 65,536 code points per plane", or 1,114,112 possible code points. However, some of these available code point values are not valid. There are 2048 surrogates and 66 noncharacters, which correspond to holes in the code point range. So the number of actual valid code points is less, it's actually 1,111,998. . So, in theory, On 13 November 2016 at 11:32, adrian <adrianh.bsc@gmail.com> wrote: > I was playing around with chr() and found that there are characters that > have > values between 0-1,114,111 (0-0x0010FFFF) but this answer > <http://stackoverflow.com/a/5928054/1366368> on SO says that there are > actually 0-1,111,998 (0-0x0010F7BE) characters. > > Is this some sort of simplification? What are the extra 2113 characters > for? > > > > -- > View this message in context: http://forum.openscad.org/chr- > value-can-have-a-range-between-0-0x0010FFFF-tp19071.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > >
MK
Marius Kintel
Sun, Nov 13, 2016 8:25 PM

Thanks Doug, I was a bit quick at jumping to conclusions :)

-Marius

Thanks Doug, I was a bit quick at jumping to conclusions :) -Marius
A
adrian
Tue, Nov 15, 2016 2:05 AM

Thanks Doug.

A

doug.moen wrote

The stack overflow answer says:
1,111,998: 17 planes × 65,536 characters per plane - 2048 surrogates - 66
noncharacters

This is correct.

The Unicode code points exist in the range 0 .. 0x10FFFF, which
corresponds
to "17 planes x 65,536 code points per plane", or 1,114,112 possible code
points.

However, some of these available code point values are not valid. There
are
2048 surrogates and 66 noncharacters, which correspond to holes in the
code
point range. So the number of actual valid code points is less, it's
actually 1,111,998.
.
So, in theory,

--
View this message in context: http://forum.openscad.org/chr-value-can-have-a-range-between-0-0x0010FFFF-tp19071p19105.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Thanks Doug. A doug.moen wrote > The stack overflow answer says: > 1,111,998: 17 planes × 65,536 characters per plane - 2048 surrogates - 66 > noncharacters > > This is correct. > > The Unicode code points exist in the range 0 .. 0x10FFFF, which > corresponds > to "17 planes x 65,536 code points per plane", or 1,114,112 possible code > points. > > However, some of these available code point values are not valid. There > are > 2048 surrogates and 66 noncharacters, which correspond to holes in the > code > point range. So the number of actual valid code points is less, it's > actually 1,111,998. > . > So, in theory, -- View this message in context: http://forum.openscad.org/chr-value-can-have-a-range-between-0-0x0010FFFF-tp19071p19105.html Sent from the OpenSCAD mailing list archive at Nabble.com.