|
> From: Bob Cozzi > > D myField S 10C Inz(%UCS2('ABABRA@#$%')) > > I used to store all my literals as literals but now I store them using > this method so I don't have issue when my code is run on a non-CCSID(37) > machine. Realize though that this is a bit of overkill for most situations. If you're using invariant characters (basically most alphanumeric characters except for @, #, $ and %), you don't need the double storage required for the Unicode data. And hopefully you have very little need for variant character literals; most multi-national programming shops removed variant characters in the mid-90s. This includes even things like variable names in source code; try to find a dollar sign on a French keyboard! There are occasions; the @ sign is certainly one of those. But since you know ahead of time what's in your literal, it's easy to determine whether you have a variant character. If you don't, using a good old character value is fine and saves you half the bytes. Joe
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.