Convert Char into AnsiChar or WideChar (Delphi)

Daisetsu picture Daisetsu · Feb 14, 2011 · Viewed 24.4k times · Source

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?

Answer

Mikael Eriksson picture Mikael Eriksson · Feb 14, 2011

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