Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Test</strong>ing for Globalization Best Practices 165<br />
Execute and Analyze the Results<br />
Execute the tests that comprise the test plan in addition to the pseudo- localization<br />
tests. Here are some of the most common problems that may occur:<br />
●<br />
●<br />
●<br />
●<br />
Special characters, such as question marks, ANSI characters, vertical bars, boxes,<br />
and tildes, appear randomly on the display.<br />
The application block returns data, such as dates, times, and currency, that is<br />
incorrectly formatted.<br />
The error messages, or other hard-coded strings, are not in accordance with the<br />
current culture setting.<br />
The application block displays incomplete messages or strings (in other words, the<br />
application block loses data).<br />
Usually, a simple code review reveals mistakes such as hard-coded strings, misuse<br />
of an overloaded method that has culture or culture-related parameters, or an incorrectly<br />
set culture-related property for the thread in which a call is executed. Here are<br />
some specific issues.<br />
●<br />
●<br />
●<br />
If special characters appear on the display, there may be a problem with the<br />
Unicode-to-ANSI conversion process. For example, a question mark may mean<br />
that the Unicode-to-ANSI conversion is not using the correct conversion tables,<br />
which are determined by the CultureInfo.LCID property. This property gets the<br />
current culture identifier. If you are trying to convert Japanese Unicode strings to<br />
ANSI on an English system, and if you do not explicitly specify the code page to<br />
use, the system will use the default code page, which does not contain information<br />
on how to convert the Japanese Unicode strings.<br />
Incorrectly formatted data may indicate that the application block has methods<br />
that do not use the current culture setting when they retrieve information.<br />
If the application block displays incomplete messages or strings, the length of the<br />
message or string may be too large in a non-English language for the application<br />
block’s buffers.<br />
For a complete list of globalization-related issues, see Globalization and Localization<br />
Issues on MSDN.