Click here to Skip to main content
15,868,054 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a Windows application and a Windows Service that both make calls to a common DLL. This common DLL spawns a process which generates my output. When run on a non-US Windows OS (zh-TW in this case) the Windows Application generates output as expected. When run as a Windows Service the output appears to be passed through a US code page as the output contains “boxes” used for non-mapped characters. This issue occurs even when the Service has a Log On As the same User that was used to run the Windows Application. There is something different in the initial environment in which the process is being launched as an application vs. service. Any information on what this difference is, and how to correct it, would be greatly appreciated.

What I have tried:

I have been working with the .NET thread Culture classes and settings but have not found any that change the output behavior.
Posted
Updated 28-Oct-19 9:45am

1 solution

Maybe it's a threading issue, see how to set DefaultThreadCurrentCulture here: Set Culture for all threads in C# apps » Romanian Coder[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900