Home > database >  PB how to realize the converting UTF16 GBK or GB2312? Directly!!!!!!!!!!!!!!
PB how to realize the converting UTF16 GBK or GB2312? Directly!!!!!!!!!!!!!!

Time:10-02

Recently did a program to read the IC card read text is UTF16 display is garbled, I don't know how to convert normal display? Exclude request!
[email protected]

CodePudding user response:

Read by a blob, 9 before FromUnicode (blob) function
After 10 String (blob, EncodingUTF16LE! )

CodePudding user response:

I encountered a similar problem
When using the pb6.5
There is no way to solve in the pb, there are many online turn gb2312 UTF16 code algorithm, I tried without success
Was forced to use Java for interface, use pb invokes the Java services to implement
I hope to inspire you

CodePudding user response:

reference 1st floor AFIC response:
with blob, read before 9 FromUnicode (blob) function
After 10 String (blob, EncodingUTF16LE! )



Yes, after 10 FromUnicode (blob) functions have been abandoned

String (blob, encoding} {)

Argument Description
Blob The blob whose value you want returned as a string. The blob can also be an Any variable containing a blob.
Encoding Character encoding of the blob you want converted. The Values are:
EncodingANSI!
EncodingUTF8!
EncodingUTF16LE! (the default)
EncodingUTF16BE!



Blob (text, encoding} {)

Argument Description
The text, The string you want to convert to a blob datatype
Encoding Character encoding of the resulting blob. Values are:
EncodingANSI!
EncodingUTF8!
EncodingUTF16LE! (the default)
EncodingUTF16BE!
  • Related