Internationalization and localization tools


Locale-Sensitive JavaScript Method

unescape(string);

Internationalization (I18n) Method Overview

The unescape method returns a copy of string that has been encoded using escape. unescape converts single and double hexadecimal encoded values back to their display values, supporting all Unicode characters, even those outside the the Basic Multilingual Plane (BMP), which require two 16-bit values (e.g. %uD840%uDC10).

In the following example, the Chinese character and spaces have been replaced with their hexadecimal encoded values:

var str = "%u6F22One%20Two%20Three%uD840%uDC10";
var result = escape(str);

Method returns:

result: 漢One Two Three𠀐

Click here (w3schools) and here (MDN) for additional details.

Note: unescape is no longer supported by Web Standards and should be replaced with decodeURI or decodeURIComponent.

I18n Issues

unescape is deprecated and should no longer be called.

Suggested Replacement

unescape is deprecated and should be replaced by calling either decodeURI or decodeURIComponent.


Globalyzer will detect this method 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 JavaScript Methods

 

Lingoport internationalization and localization services and software