I am using lazarus version and the latest version of the difference is not too much,
Lazarus support Delphi, so I had to come here to post inquiries,
My question is, at the time of call standard DLL, passing parameters when Chinese garbled,
Although I can use UTF8ToCP936 to transform coding, this method really solve the problem, one of my,
At the time of call DLL, usually we will use a constant does not specify a default data type (const) to store the name of the DLL, with convenient access to maintenance,
I now another problem is that when I need to call the DLL file name in Chinese (or pure Chinese), will prompt file does not exist, and prompt box in the file name is gibberish, excuse me, how to solve,
CodePudding user response:
Add double quotation marks in the file name
CodePudding user response:
reference 1st floor SupermanTm response: file name add double quotation marks support CodePudding user response:
Although the above said all the partners, but I want to say who is so hurt to a Chinese name to use? Besides, can't you change to English? CodePudding user response:
Delphi using Chinese name DLL without any problems, do not need special treatment, lazarus has problem to estimate the cause of the source file is the default character encoding, use UTF8 or UTF16 code would be better to save the source file CodePudding user response:
reference boylafong reply: 3/f although the friends all say, but I want to say who is so hurt to a Chinese name to use? Besides, can't you change to English? Special circumstances, special treatment, I will do some special treatment, so we get so, CodePudding user response:
refer to the second floor lyhoo163 response: Quote: refer to 1st floor SupermanTm response: File name add double quotation marks support Can you give an example? For example: I was writing is ='DBK64 SkinH_DLL. DLL'; The function SkinH_Attach: Integer; Stdcall; External SkinH_DLL; I change the file name to skin two characters, how to make? CodePudding user response:
reference 4 floor DelphiGuy response: Delphi using Chinese name DLL without any problems, don't need special handling, lazarus has problem to estimate the cause of the source file is the default character encoding, use UTF8 or UTF16 code would be better to save the source file Files encoded utf-8, I use notepad + + after changed to ANSI, lazarus and changed to utf-8 CodePudding user response:
refer to 6th floor bx897911494 response: Quote: refer to the second floor lyhoo163 response: Quote: refer to 1st floor SupermanTm response: File name add double quotation marks support Can you give an example? For example: I was writing is ='DBK64 SkinH_DLL. DLL'; The function SkinH_Attach: Integer; Stdcall; External SkinH_DLL; I change the file name to skin two characters, how to make? SkinH_DLL='" skin. DLL "; . CodePudding user response:
What he said is such SkinH_DLL='" skin. DLL "'; Will be a problem... To: SkinH_DLL=UnicodeString (" skin. DLL "); CodePudding user response:
reference 4 floor DelphiGuy response: Delphi using Chinese name DLL without any problems, don't need special handling, lazarus has problem to estimate the cause of the source file is the default character encoding, use UTF8 or UTF16 code would be better to save the source file Thanks. Files encoded utf-8, after I use notepad + + to ANSI, lazarus and changed to utf-8. After good, founded the pas file is others, I didn't expect this,