Home > Back-end >  Delphi2010 field value AsAnsiString garbled
Delphi2010 field value AsAnsiString garbled

Time:10-17

program used on Japanese operating system, the export Excel function, take the Dataset values, using AsString passed values would be exported complains, should be a different operating system environment, change AsAnsiString export value is no problem, but some Japanese characters will export will be garbled, such as this a few "????????? "String, become garbled, is in a dilemma,
Please experts to understand, to the younger brother correct once, be obliged,

CodePudding user response:

Lu, before sleeping AsString passed values will is used to derive the complains?

CodePudding user response:

UTF8 encoding problem again?
Japanese system?
Xiao zhang is don't you?
Ha ha!

CodePudding user response:

Japanese system, should use the AsString, Unicode to collect

CodePudding user response:

refer to the original poster cwl007 response:
program used on Japanese operating system, the export Excel function, take the Dataset values, using AsString passed values would be exported complains, should be a different operating system environment, change AsAnsiString export value is no problem, but some Japanese will export will be garbled characters, such as this a few "????????? "String, become garbled, is in a dilemma,
Please experts to understand, to the younger brother correct once, be obliged,
AsAnsiString gibberish values
yes, the Japanese operating system Windows 7 + office 2013 environment

CodePudding user response:

reference 1st floor sololie response:
lu, before sleeping AsString passed values will is used to derive the complains?

Yes, the Japanese operating system Windows 7 + office 2013 environment

CodePudding user response:

refer to the second floor lengyuehui response:
UTF8 encoding problem again?
Japanese system?
Xiao zhang is don't you?
Ha ha!

Is not well, the problem is not the same as what you said zhang should be, glad to hope to understand,

CodePudding user response:

Using AsVariant type,
Or convert TWideStringField processing again, this depends on what is your stored data types,
  • Related