[OpenSCAD] How to detect chr(0)

MichaelAtOz oz.at.michael at gmail.com
Fri Apr 17 17:52:33 EDT 2015


Fantome wrote
> When OpenScad echos/prints the chr(value), what it prints matches with the
> ASCII chart. This is why I named the variable ASCII_value. I don't think
> it's misleading. It is the ASCII value. It works for all 255 values, value
> 0 is the only one that is ignored by OpenSCAD. 

Note this line in the wiki re chr():

Note: When used with echo() the output to the console for character codes
greater than 127 is platform dependent.

Also code-points above 0x7F are actually stored as 2 bytes

U+0080 	U+07FF 	2 bytes 	110xxxxx 	10xxxxxx  wikipedia
<http://en.wikipedia.org/wiki/UTF-8>  

The UTF-8 ASCII 'compatability' in terms if byte code is only for 00-7F.

@Torsten, according to Wikipedia, 0x00 is NULL and is a valid code point.
???





-----
Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/
--
View this message in context: http://forum.openscad.org/How-to-detect-chr-0-tp12351p12410.html
Sent from the OpenSCAD mailing list archive at Nabble.com.




More information about the Discuss mailing list