Tag Archives: Unicode

Configuring “Language for non-Unicode programs” via the registry in Server 2003.

As a break from server 2008 r2 profiles, I recently had a customer with a character display issue in our xenapp environment. Their local characters were not displaying correctly when run from our English XenApp servers. The language in question was Czech and numerous characters were incorrect or null in application menu’s and data contained in the application.

Testing the Microsoft AppLocale utility ended in utter failure, so we had no choice but to modify the default unicode option on the server 2003 operating system to change this to Czech.

Now this is all very simple to do from a console, start > run > intl.cpl > advanced and choose your language from a drop down list. But what if you want to automate, or script it?

No group policy exists for managing this option, and the documentation / forums online do not cover a full answer to the question. This also cannot be applied on a per user basis, this is strictly a per machine setting.

In my case, the language needed was Czech, and the below steps assume Czech language, this probably will work for any other… but let it be known here’s your disclaimer!

The process we’ll use, is to capture the regional and language options from one server, then export them for the remaining servers.

Step 1: create the necessary changes:

  • As mentioned above, click start, run, Intl.cpl.
  • Choose the advanced tab:

  • Choose the language you wish from the drop down list:

  • Hit Apply
  • Choose “yes” from the dialogue box, to skip the file copy if needed

  • Choose “no” to restart later.

click “Ok” to close.

Step 2: capture the changes:

  • Create a folder on the root of the c: drive, called “c:unicode-export”
  • Once you’ve made the changes listed above, fire up regedit (start > run > regedit).
  • Export the following keys to the c:unicode-export folder to .reg files:
  • (right click the key, and choose export, I named them 1-6 respectively for convenience.)
  1. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionFontMapper]
  2. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionFonts]
  3. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionFontSubstitutes]
  4. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionGRE_Initialize]
  5. [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlNls]
  6. [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetHardware ProfilesCurrentSoftwareFonts]
  • Copy the following file to the c:unicode-export folder:
  1. c:windowssystem.ini

Once finished, you should end up with 6 registry files, and 1 ini file in the “c:unicode-export” folder:

Step 3: import the settings on the subsequent servers:

  • Copy the c:unicode-export folder from your source server to the target server:
  • import the keys / ini with this simple script:

for /f /%%a in (‘dir /s /b c:unicode-export*.reg’) do regedit -s %%a

copy /y c:unicode-exportsystem.ini c:windows

Note: (if you run this from a command line, outside of a batch file, replace %%a with %a.)

And that’s it, once the script is finished you can delete the c:unicode-export folder and restart the server.

This was a massive pain in the arse to get to the bottom of (excuse the pun) so I hope its useful to somebody! I’ll also be reviewing this by the end of the year for server 2008 r2.