|
Thanks Thomas. It looks like the conversion of the value is my only
option. I was hoping for a "locale" safe version or option since the
original string has an associated mac and I didn't want a "temp" stored
version.
Thanks.
On 3/23/2013 1:30 PM, Thomas Raddatz wrote:
The regular expression functions belongs the group of function that are
locale sensitive. From the IBM i Information Center:
"Locale Sensitive: The behavior of this function might be affected by the
LC_CTYPE and LC_COLLATE categories of the current locale. This function is
not available when LOCALETYPE(*CLD) is specified on the compilation
command. For more information, see Understanding CCSIDs and Locales."
I always convert the pattern and the value to the CCSID of the current
locale using ...
nl_langinfo(CODESET) to get the CCSID
QtqIconvOpen(), iconv() and iconv_close() to convert the CCSID
... before I use regcomp(), regexec() and regfree() to apply the regular
expression to the value.
Thomas.
Am 22.03.2013 15:24, schrieb Tim Bronski:
I've cross posted this to the C list but it doesn't get much traffic so
this question might get more of an audience here. I've been having
issues with using regular expressions (as in a sscanf function) where
the locale might vary. I've looked all over the ibm site but there's
very little with any definition on exactly what effect locales have on
expression statements. How do I locale protect my expressions?
--
Need secure FTP? Forget PASE...get your FREE sFTP here
www.arpeggiosoftware.com
--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
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.