Internationalization and localization tools


Locale-Sensitive Perl Methods

"example" lt "string";
"example" gt "string";
"example" le "string";
"example" ge "string";
"example" eq "string";
"example" ne "string";

Internationalization (I18n) Method Overview

The lt, gt, le, ge, eq, and ne operators return true if the left argument matches the stringwise comparison against right argument. Comparisons are less than, greater than, less than or equal to, greater than or equal to, equal to, and not equal to.

See perlop and perllocale for additional details.

I18n Issues

The listed operators respect locale settings given by the LC_COLLATE value as set for the current locale. However, Unicode string comparison is determined by code point index. Be wary of pre-composed Unicode characters. For instance, LATIN CAPITAL LETTER A followed by COMBING ACUTE ACCENT is visibly the same as LATIN CAPITAL LETTER A WITH ACUTE. However, these two characters have different code points, and will be regarded as different by these string comparison operators.

Suggested Replacement

Consider functions from the modules Unicode::Collate and Unicode::Collate::Locale

Globalyzer will detect this function and report it as an i18n issue. If you have determined that the call is being handled correctly, you can use Globalyzer's Ignore Comment functionality to ensure that it isn't picked up in a subsequent scan.



Locale-Sensitive Perl Methods

 

Lingoport internationalization and localization services and software