Question marks unexpectedly appear instead of localized characters when you use the Microsoft Visual Studio


Symptoms


When you use the Microsoft Visual Studio external ATL/MFC Trace Tool, question marks ("?") unexpectedly appear instead of localized characters.

Cause


This problem occurs because the ATL/MFC Trace Tool does not support Unicode characters. When the default Microsoft operating system ANSI codepage does not match the codepage that is required for the ATL/MFC Trace Tool, Unicode characters appear as question marks ("?").

Workaround


To work around this problem, install the AppLocale utility. Then, use the AppLocate utility to configure the ATL/MFC Trace Tool.

The following file is available for download from the Microsoft Download Center:


Download Download the Apploc.msi package now.Release Date: June 14, 2004

For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.


To install the AppLocale utility, follow these steps:
  1. In the folder where you downloaded the AppLocale utility installation file, double-click Apploc.msi to start the AppLocale Installation Wizard.
  2. Follow the instructions on the screen to complete the installation.
To configure the ATL/MFC Trace Tool, use one of the following methods.

Method 1: Use the AppLocale interface

Directly configure the ATL/MFC Trace Tool by using the AppLocale interface. To do this, follow these steps:
  1. Examine the default configuration of the ATL/MFC Trace Tool. To do this, follow these steps:
    1. Start Microsoft Visual Studio.
    2. On the Tools menu, click External Tools.
    3. Click ATL/MFC &Trace Tool.
    4. Make a note of the contents of the Command box and the Arguments box.
  2. Click Start, point to All Programs, point to Microsoft AppLocale, and then click AppLocale.
  3. Click Next.
  4. On the Locate The Application page, click Launch an application.
  5. Click Browse to locate the ATL/MFC Trace Tool executable file, and then click OK.
  6. In the Arguments box, specify the arguments that you noted in step 1d, and then click Next.
  7. Follow the instructions on the screen to complete the wizard.

Method 2: Configure Visual Studio

Configure Visual Studio to use the AppLocale utility. To do this, follow these steps:
  1. Start Visual Studio.
  2. On the Tools menu, click External Tools.
  3. In the External Tools dialog box, click Add.
  4. In the Command box, type %SystemRoot%\AppPatch\apploc.exe.
  5. In the Arguments box, type the ATL/MFC Trace Tools executable path, file name, and any required arguments. To find this information, examine the default ATL/MFC Trace Tool configuration. Separate the path and the arguments by using a blank space, and separately enclose both the path and the arguments in quotation marks.
  6. In the Initial Directory box, type $(TargetDir), and then click OK.

Status


This behavior is by design.

More Information


The Microsoft AppLocale utility is a temporary solution to limitations with some non-Unicode applications. These limitations are caused by non-Unicode applications that are running on the Unicode (UTF-16)-based Microsoft Windows XP. AppLocale detects the language of the non-Unicode application and then simulates a corresponding system locale for code-page conversions to and from Unicode. You can use the AppLocate utility to configure the following ANSI-based tools:
  • ActiveX Control Test Container
  • Error Lookup
  • ATL/MFC Trace Tool
  • Spy ++
  • ISAPI Web Debug Tool