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.
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
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
Thanks Doug, I was a bit quick at jumping to conclusions :)
-Marius
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.