Is it possible to use ALT 227 (π) as a PostScript constant?

As far as I can see (postscript manual page 45 names have to be characters and characters have to be "printable ascii" and there are no ascii characters above 127. As noted in comments elsewhere the manual clarifies that the restriction to ASCII (that is characters below 128) is only a recommendation.

A quick test with ghostscript shows that /Pi {3.14} def /2π {2 Pi mul} def 2π is a syntax error but /Pi {3.14} def /zz {2 Pi mul} def zz works (leaves 6.28 on the stack)


In the above I assumed that π was encoded as in the question on this site in UTF-8 and used the same encoding in my test file. Unicode π is U+03C0 (character 960) not 227.

To test character 227 I saved the test file in latin-1 encoding and used ã then it does work in ghostscript.

If you save

/Pi {3.14} def /2ã {2 Pi mul} def 2ã
==

/Pi {3.14} def /zz {2 Pi mul} def zz
==
quit

as latin1 (iso-8859-1) not UTF-8 and execute with gs then teh terminal shows

GPL Ghostscript 9.21 (2017-03-16)
Copyright (C) 2017 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
6.28
6.28

showing both expressions evaluated 2pi.