× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.