Jump to content

Finding multi-byte characters in a data field


Sara Smith

Recommended Posts

Hi,

Our primary information system is configured to allow the entry of multi-byte characters especially so people's names can include accents, tildes, umlauts, etc. but the system that creates email accounts based on user names cannot handle multi-byte characters.  In SQL there are two length functions, one that gives the length in characters and another that gives the length in bytes.   That makes it easy to find names with multi-byte characters -- if the length in characters and the length in bytes don't match then you know that name contains a multi-byte character.   But I would like to be able to do a similar thing in WebFOCUS and then create a ReportCaster alert to notify our system admins.  I've looked in the documentation but I can't seem to find an easy way to do this in WebFOCUS.   I don't want to have to search fields for specific characters.

Any ideas?

Thanks!

P.S.  We are using WF 9.2.1 (Cloud)

Link to comment
Share on other sites

  • 2 weeks later...

Hi @Sara Smith might be useful see function UFMT?

TABLE FILE CAR
SUM CAR NOPRINT 
    COMPUTE NAME_UMLAUTS/A50    = 'Günther';
    COMPUTE NAME/A50            = 'Gunther';
    COMPUTE HEXCODE_UMLAUTS/A6  = UFMT(NAME_UMLAUTS, 50, HEXCODE_UMLAUTS);
    COMPUTE HEXCODE_NAME/A6     = UFMT(NAME, 50, HEXCODE_NAME);
END

UFMT: Converting an Alphanumeric String to Hexadecimal

The UFMT function converts characters in an alphanumeric source string to their hexadecimal representation. This function is useful for examining data of unknown format. As long as you know the length of the data, you can examine its content.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...