You need str_cmp or str_cmpi to compare two strings
or characters instead of what you did.

I think 6.10.2 is too old, update your GS version
if you can.