I just did a small test project to confirm this. A simple setup where I put an on change microflow on a text field which calculates and displays the attribute length. áááá gives a length of 8. áááább gives a length of 10.
I wondered whether a java action to return the string length would return the same result, and unfortunately it does - it also sees á as 2 characters. Perhaps there is another java function that can take account of the character set that might return the correct length.
OK I managed to get my java action to return the correct character count by first Normalizing the string. In my java action I import the class java.text.Normalizer then use
public static String stripAccents(String s) { return Normalizer.normalize(s, Normalizer.Form.NFD) .replaceAll("[^\p{ASCII}]", ""); }The length function on this cleaned string then returns the expected length.
Ganesh, so to solve your issue you should make the following changes:
I would say it is a bit different. If the character is in the UTF-8 charset, then Mendix handles it properly. Try any of the UTF-8 special characters and copy them from this site:
To see that the Mendix max field length for String does adhere to UTF-8. So, also the character you mention above will work within Mendix and will be seen as a single character. This means adding to the length of the limited String in the Mendix database is NOT necessary for UTF-8 chars.