ASCII ?
Author: i2stiller@gmx.de (istiller)
I want to check weather a character is a ASCII character or not. But $syntax("?*") did not does it job IF ( "Ä"=$syntax("?*")>0 ) putmess "Ä is ASCII ? " ELSE putmess "Ä is not ASCII" ENDIF Is A-umlaut really a ASCII-character Ingo
Hi Ingo, AFAIK A-umlaut should be an extended letter while what we call ASCII table should be limited to the original 7bit characters, having values 0-127. Probably you could have better luck with ~&* or ~@*. The real question is: in a Unicode world should these characters categories be renamed / revisited / extended? Regards, Gianni
Author: gianni (gianni.sandigliano@unifacesolutions.com)
ASCII ?
Author: i2stiller@gmx.de (istiller)
I want to check weather a character is a ASCII character or not. But $syntax("?*") did not does it job IF ( "Ä"=$syntax("?*")>0 ) putmess "Ä is ASCII ? " ELSE putmess "Ä is not ASCII" ENDIF Is A-umlaut really a ASCII-character Ingo
Hello, It looks like that $syntax("?*") is not limited to ASCII characters in version 9, but to the complete Unicode range. It seems that this issue has been reported before and the idea was to update the documentation. Not sure why this was not done (yet). I'll check with the lab. But in case you would like to check if a letter is in the ASCII range then using $syntax("&*") should return the expected result. E.g.
IF ( "Ä"=$syntax("&*") ) putmess "Ä is ASCII ?" ELSE putmess "Ä is not ASCII" ENDIF
Btw. your code sample contains a small typo and the result is just a compiler error.
Hope this helps. Daniel
Author: diseli (daniel.iseli@uniface.com)
ASCII ?
Author: i2stiller@gmx.de (istiller)
I want to check weather a character is a ASCII character or not. But $syntax("?*") did not does it job IF ( "Ä"=$syntax("?*")>0 ) putmess "Ä is ASCII ? " ELSE putmess "Ä is not ASCII" ENDIF Is A-umlaut really a ASCII-character Ingo
Just a quick FYI: the problem was recognized as BUG#28745 (Syntax codes for pattern matching: ? also matches Unicode characters).
Author: diseli (daniel.iseli@uniface.com)