DBCS character in published-app's argument appears as garbages

DBCS character in published-app's argument appears as garbages

book

Article ID: CTX212663

calendar_today

Updated On:

Description

DBCS characters in published-app's arguments appear as garbages.

<Repro Steps>
1. Create the following bat file on the VDA.

test.bat
---
 @ECHO OFF 
 ECHO Arg: %1 
 PAUSE 
---

2. Create a shortcut for the bat file above. Place these 2 files to some folder on the VDA.
---
>dir /s/b
C:\PUB_APP\ShowArg.lnk
C:\PUB_APP\test.bat

>type test.bat
@ECHO OFF
ECHO Arg: %1
PAUSE
>
---

3. Publish the shortcut as a publish application with Citrix Studio. For example below, appname is ShowArg.

In order to receive arguments, please set %** to "command line argument" in property of the published app.
---
Application Setting > Location > command line arguments: %**
---

4. Logon to Citrix Receiver on a Endpoint Device.

5. Issue the following command and make sure it works fine.

 c:\Program Files\Citrix\ICA Client\SelfServicePlugin\SelfService.exe -qlaunch ShowArg Citrix 

6. But DBCS appears as garbages if issuing the following command 

 c:\Program Files\Citrix\ICA Client\SelfServicePlugin\SelfService.exe -qlaunch ShowArg シトリックス 
 

 

Resolution

Currently unknown. To clarify the root cause, further investigation by Windows API side is required.
We have not received any feedback yet.

 

Problem Cause

We store the cmdline params in global atom table and then read them out by using Microsoft Windows API. 
From the traces we could find that before we call the windows API to store the params, they are right, 
but when we read out them by calling Windows API, they are wrong. 

We use GlobalAddAtom to store some cmdline when we try to launch an application, 
but when we read out the cmdline by calling GlobalGetAtomName, we get the wrong params. 

This problem also occurs with a sample program which stores the cmdline params in global atom table
and read out the cmdline by calling GlobalGetAtomName.