Internationalization and localization tools


Locale-Sensitive Perl Method

uc EXPR

Internationalization (I18n) Method Overview

The uc function returns an uppercased version of EXPR. This is the internal function implementation of the \U escape in double-quoted strings.

See perl's uc function documentation for additional details.

I18n Issues

Many locales do not contain the concept of case changes. Do not rely on or expect this functionality.

Suggested Replacement

Perl has better support for case changes between characters represented by 1 byte (up to 255) and more than 1 byte (256+) after perl v5.20 and with UTF-* locales. Ideally, use only UTF-8 locales and at least perl v5.20. If possible, perl v5.22 is desirable. It will provide some error checking, and warn if the 255/256 barrier is crossed.

Do not assume that all locales will support case changes. Do not make logical assumptions based on whether a case change occurs.

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