special characters

mmniet

New Member
Hi,

I want to compare 2 variables with each other, if they are not even a message have to show.

Example
Code:
DEF VAR a AS CHAR CASE-SENSITIVE
DEF VAR b AS CHAR CASE-SENSITIVE
....
IF a NE b THEN
  MESSAGE "try again!" VIEW-AS ALERT-BOX INFO BUTTONS OK


In the next cases I want to have a message:
  • a = "A" and b = "a" (this works)
  • a = "1" and b = "u" (this works)
  • a = "ë" and b = "e" (this doesn't work)
I hope someone can give me a hand.
 
Just stepping in ...

Is your aim to just compare variables or is your aim to prevent users from entering invalid characters into your application?

If the latter is the case then you need to define a list of invalid characters, or better yet ranges of ascii characters that are valid. Before you skip the invalid characters you could do some replacements, for example replacing the German umlaut ä with ae and so on. Before saving it to the database it would be nice for the users to see a warning message telling them that the characters they've entered were modified so that they have a chance to either reject or accept the modification done by your logic. Still, all this will depend on the code page you are using.

Mostly I've done this as a response of users doing copy/paste from an HTML page in the web browser directly into a Progress widget (FILL-IN or EDITOR) which will most likely include "funky" invisible characters. This is not necessarily a problem in Progress, but it will cause problems when "getting" the data into other systems via XML, for example.


HTH, RealHeavyDude.
 
Back
Top