#1 2022-11-16 02:05:43

lfyey121
Member
From: china
Registered: 2022-08-25
Posts: 56

The Chinese displayName of TsynDaemon is displayed incorrectly

I used FPC3.2.4, lazarus 2.2.4 .
TsdExtDaemonSetting to set displayName in Chinese. The service can be installed normally, but in the service manager, the ServiceDescription of the service will display garbled characters.

Offline

#2 2022-11-22 14:32:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: The Chinese displayName of TsynDaemon is displayed incorrectly

I have just made a huge refactoring of our Windows Service API:
https://github.com/synopse/mORMot2/commit/0e672041
https://github.com/synopse/mORMot2/commit/037ab917

FPC is sometimes confusing about its string type, which is typically UTF-8 with Lazarus, and therefore not consistent with the Windows API codepage as old Delphi versions.

Now you can set the DisplayName as RawUtf8, and it will use properly the UTF-16 Windows API calls as expected.

Offline

#3 2022-11-23 09:38:51

lfyey121
Member
From: china
Registered: 2022-08-25
Posts: 56

Re: The Chinese displayName of TsynDaemon is displayed incorrectly

Yes, the service description can now be displayed in Chinese normally.

thank you @ab

Offline

Board footer

Powered by FluxBB