12 Liu Yu male, 24, 410205197511131012 $
Chinese character code is as follows:
Liu Yu: C1F5D3E4
Male: C4D0
Age: CBEA can be changed
The code is written like this:
I_ole_comm. The OutPut=12 C1F5D3E4 C4D0 24 cbea can be changed 410205197511131012 $
But a serial port equipment is I preach in printed, no decoding, print something as follows:
C1F5D3E4 C4D0 24 cbea can be changed 410205197511131012
How should the incoming to decode, please give examples, many thanks
CodePudding user response:
Direct write Chinese characters?CodePudding user response:
Do not understand, help topI also feel is directly have to do is to write Chinese characters,
The building Lord, your question should be asked "how from decoded into Chinese character interior code in the Chinese character"
CodePudding user response:
Check your application, be sure it is you did when the output from the com transform coding, how code is how to restore, or remove encoding it is good to receive directlyCodePudding user response:
The transfer of information to a serial port equipment is as follows:12 Liu Yu male, 24, 410205197511131012 $
Chinese character code is as follows:
Liu Yu: C1F5D3E4
Male: C4D0
Age: CBEA can be changed
The code is written like this:
I_ole_comm. The OutPut=12 C1F5D3E4 C4D0 24 cbea can be changed 410205197511131012 $
But a serial port equipment is I preach in printed, no decoding, print something as follows:
C1F5D3E4 C4D0 24 cbea can be changed 410205197511131012
How should the incoming to decode, please give examples, many thanks
The incoming is wrong, you can't use the
I_ole_comm. The OutPut=12 C1F5D3E4 C4D0 24 cbea can be changed 410205197511131012 $
So the incoming of characters, you can directly use Chinese characters try
I_ole_comm. The OutPut 12 Liu Yu male, 24, 410205197511131012 $'='
If not, the string to a blob, then introduced to try
I_ole_comm. The OutPut=blob (12 Liu Yu male, 24, '$410205197511131012', EncodingUTF8!)