[fpc-devel] Warning: Unicode constant cast with potential data loss
XHajT03 at hajny.biz
Thu Sep 17 15:47:30 CEST 2020
On 2020-09-17 15:37, Martin via fpc-devel wrote:
> FPC 3.2.0
> u,u2 : UTF8String;
> u := #$2267'x';
> u2 := #$2267; // warning
> Assigning a WideString to a Utf8String works without warning.
> Assigning a WideChar (2nd line) to a Utf8String causes "Warning:
> Unicode constant cast with potential data loss"
> Apparently it is first converted to a char in the System codepage, and
> then to string.
> Is that intended?
FWIW, this looks similar to my observation described in number 2 at the
More information about the fpc-devel