Using Locale dependent String functions toUpper and toLower - Forum - Corticon - Progress Community

Using Locale dependent String functions toUpper and toLower

 Forum

Using Locale dependent String functions toUpper and toLower

This question is answered
While trying to see if I can use string functions toUpper and toLower with a different Locale than the system locale. I could not find a way to pass the locale I want to the functions. Is there a way?

For example, in Turkish Locale, input data: "Nuri", toUpper data should be "NURİ" but if the machine locale is EN than the functions returns "NURI" and of course the rules don't get executed correctly.

In java, they have the possibility to pass in the locale for the toUpper and toLower methods.
Verified Answer
  • Thank you for your reply. Actually, I built the operator where it takes the locale as a parameter to make it independent of the locale for the JVM/System.

    It implements ICcStringExtension and expects a locale string like 'tr'.

All Replies
  • You can develop you own Extended Operator to do just that. The documentation for developing Extended Operators can be found here: http://documentation.progress.com/output/Corticon/5.4.1/corticon_extensions.pdf
     
    Your class should implement ICcStringExtension, and you can determine the locale via Java:
    System.getProperty("user.country");
    System.getProperty("user.language");
     
     
    Christopher S. Hogan
    Principal Systems Engineer

    Progress

    PHONE 646-201-4123
    MOBILE 646-243-4282
    www.progress.com
    Twitter
    Facebook
    LinkedIn
    Google+
     
     
    From: nuri.besen [mailto:bounce-nuribesen@community.progress.com]
    Sent: Tuesday, March 31, 2015 11:09 AM
    To: TU.Corticon@community.progress.com
    Subject: [Technical Users - Corticon] Using Locale dependent String functions toUpper and toLower
     
    Thread created by nuri.besen
    While trying to see if I can use string functions toUpper and toLower with a different Locale than the system locale. I could not find a way to pass the locale I want to the functions. Is there a way?

    For example, in Turkish Locale, input data: "Nuri", toUpper data should be "NURİ" but if the machine locale is EN than the functions returns "NURI" and of course the rules don't get executed correctly.

    In java, they have the possibility to pass in the locale for the toUpper and toLower methods.
    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • Thank you for your reply. Actually, I built the operator where it takes the locale as a parameter to make it independent of the locale for the JVM/System.

    It implements ICcStringExtension and expects a locale string like 'tr'.