We are using a PB client and entering data in arabic with PC regional settings as "English". The PB application calls VC++ DLL via an external function. When I see the string value in debug mode inside VC++ DLL function, these arabic characters become "????" and code as 3f.
The same string works fine if I set the regional setting of the PC as "Arabic".
Pls. help.

1. In the VC++ DLL we have published a function "write_to_file" that expects a string from the frontend/PB. This string is printed to a txt file on the client machine.

extern "C" _declspec(dllexport) long _stdcall write_to_file(char * str)
FILE * fp = fopen("D:\\arabic_text.txt","w");
if (fp == NULL)
return -1;

char * str1 = "3 4 B";
fprintf(fp,"static text %s\n",str1);
fprintf(fp,"from appln %s\n",str);
return 0;

2. In Powerbuilder this function was published as a local external function , which is called by the PB window with the string as input.

Function declaration is as follows - FUNCTION long write_to_file(String str)Library "qz32.dll" alias for "write_to_file;Ansi"

The PB window code snippet -
ue_printtofile( )
String value1
value1 = this.dw_2.GetItemString(1,"value")

Observations: The static text string "str1" also has three arabic characters that are being being printed fine to the flat file. The problem is with the string that we receive from the PB window.
For the sake of simplicity I have sent the same three Arabic characters from the PB screen that I have hardcoded in the DLL.
Hence if in debug mode (VC++ DLL) I examine the memory location ( of string coming as input) and compare it with the contents of the static/hardcoded string str1, I can very clearly see that the character codes are different.

Any suggestions/clue will be highly appreciated.