Using Locale dependent String functions toUpper and toLower

Posted by nuri.besen on 31-Mar-2015 10:07

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.

Posted by nuri.besen on 05-Apr-2015 23:26

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

Posted by Chris S. Hogan on 31-Mar-2015 10:58

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+
 
 
[collapse]
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.

[/collapse]

Posted by nuri.besen on 05-Apr-2015 23:26

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'.

This thread is closed