Search code examples
delphiunicodedelphi-xewidechar

Convert Char into AnsiChar or WideChar (Delphi)


I'm upgrading a very old (10+ years) application to the latest Delphi XE. There are a number of errors I keep getting like

Incompatible types: 'WideChar' and 'AnsiChar'

I have been just casting the char to the right type: ex. AWideChar = WideChar(fncReturnsChar);

Is this going to cause problems?


Solution

  • There might be problems in there for you. Here is a white paper on Unicode in Delphi by Marco Cantù.

    http://edn.embarcadero.com/article/38980