<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">The refence John Carlson identified suggests using a 'processing instruction' as the first line of the x3d.py file, the line would be:<div class=""># -*- coding: utf-8 -*-</div><div class="">and this allows the Python 2 interpreter to read the source file assuming UTF-8 encoding; for the current download of x3d.py (as of 12 June 2020) this works, Python 2 accepts the non-ascii character (in this case, the non-ascii character is the "MULTIPLICATION_SIGN" , unicode 215, used in a documentation comment.)</div><div class=""><br class=""></div><div class="">However, elsewhere in the x3d.py, the print({text}) form of the Python print statement is used, and that is only permitted in Python 3.</div><div class=""><br class=""></div><div class="">As it is written now, x3d.py is only supported by Python 3. I think this is a reasonable choice.</div><div class=""><br class=""></div><div class="">Vince Marchetti</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 12, 2020, at 12:31 AM, John Carlson <<a href="mailto:yottzumm@gmail.com" class="">yottzumm@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><a href="https://www.python.org/dev/peps/pep-0263/" class="">https://www.python.org/dev/peps/pep-0263/</a>   (declaring an encoding)<br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 11, 2020 at 2:20 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" class="">andreasplesch@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><span style="font-family:monospace" class=""><span style="" class="">$ python
</span><br class="">Python 2.7.16 (default, Oct 10 2019, 22:02:15)  <br class="">[GCC 8.3.0] on linux2
<br class="">Type "help", "copyright", "credits" or "license" for more information.
<br class="">>>> import x3d.x3d as x
<br class="">Traceback (most recent call last):
<br class="">  File "<stdin>", line 1, in <module>
<br class="">  File "/home/andreas/.local/lib/python2.7/site-packages/x3d/x3d.py", line 206
<br class="">SyntaxError: Non-ASCII character '\xc3' in file /home/andreas/.local/lib/python2.7/site-packages/x3d/x3d.py on line 206, but no encoding declared; see <a href="http://python.org/de" target="_blank" class="">http://python.org/de</a><br class="">v/peps/pep-0263/ for details<br class="">
<br class=""></span><span style="font-family:monospace" class=""><span style="" class="">$ cat -nA  /home/andreas/.local/lib/python2.7/site-packages/x3d/x3d.py | grep 206 | head -1
</span><br class="">   206      'SFMatrix3d', # Single Field (singleton) 3M-CM-^W3 matrix of double-precision floating point numbers$<br class=""></span><div class=""><br class=""></div><div class="">There are indeed non-ascii characters.</div><div class=""><br class=""></div><div class="">python3 does not complain.</div><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Andreas Plesch<br class="">Waltham, MA 02453</div></div></div></div>
_______________________________________________<br class="">
x3d-public mailing list<br class="">
<a href="mailto:x3d-public@web3d.org" target="_blank" class="">x3d-public@web3d.org</a><br class="">
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank" class="">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br class="">
</blockquote></div>
_______________________________________________<br class="">x3d-public mailing list<br class=""><a href="mailto:x3d-public@web3d.org" class="">x3d-public@web3d.org</a><br class="">http://web3d.org/mailman/listinfo/x3d-public_web3d.org<br class=""></div></blockquote></div><br class=""></div></body></html>