chr equivalent for Unicode in Delphi 7
问题 I need to initialize a Widestring in Delphi 7 but I can't use chr function which is ANSI var ws : Widestring; begin ws := chr($FFFF) + chr($FFFF) + chr($FFFF); end; What can I use, then ? Thanks 回答1: I'm not sure there's a simply way to do what you wish. You can convert a Word into a WideChar with a simple cast: WideChar($FFFF) but you cannot concatenate WideChar . So this is a compiler error: WideChar($FFFF) + WideChar($FFFF) You could use a helper function to get the job done: function