Fun With Extended Characters

Johnson, Tracy Tracy.Johnson at meas-spec.com
Wed Mar 28 11:36:16 CDT 2007


We had an extended character entered into one of our Work Order databases.  I had a fun this morning writing a little Quiz code to grab the work order.  

On the Windows side it could have been entered as Unicode Hexideximal (03BC) or ALT-X.   This can happen when a non-U.S. user has a Windows language bar enabled at the bottom right of their screen.  Usually invoked by hitting ALT first.  (And rightly so in say for example,  ...  France, where the data entry occurred.)  On an old HP terminal you can see it if you hit Extend_Char followed by a backslash.  

I'm sure non-English users run into this situation all the time.  However as a U.S. user I'm not used to it and it created a little adventure.

The character was ASCII(243) appended to one of our Work Order numbers.  It displayed on an HP terminal as a Greek Mu (µ).   Or if using FREEVT3K in Linux it would show as an acute accented small o (ó).

The Quiz code to grab the Work Order (WOWO) from our open Work Order file (OWOF) was: 

ACCESS OWOF
DEFINE NUM243 INTEGER = 243
DEFINE ASCII243 CHAR*3 = CHARACTERS(NUM243)
DEFINE MUSYMBOL CHAR*1 = ASCII243[2:1]
DEFINE MYSELECT CHAR*8 = "35415-1" + MUSYMBOL
SELECT IF WOWO = MYSELECT
REPORT WOWO


Feel free to comment on my methods.  

(YES I COULD have used a substring to weed out the unwanted character but this was more fun.)


Tracy Johnson
Measurement Specialties, Inc.

BT







NNNN







More information about the powerh-l mailing list