Skip to Content
Former Member
Jun 15, 2006 at 05:30 PM

Field check for "codepage-safe" characters


I need to check a field to make sure it only contains (printable) characters from the good old 7-bit ANSI codepage. This is to make sure that when ALEing the data to non-Unicode systems, which in our environment can have just about any codepage (except Asian ones), all characters are displayable.

In a non-Unicode system, I could cast each character into a hex field and check that its value is smaller than or equal to 7F; in a Unicode system, this doesn't seem to be a suitable approach.

I could of course define a string into which I enter all the allowed characters and then compare with a CO statement; but I'm hoping that somebody has a more elegant solution.