[fpc-pascal] Unicode chars losing information

Tomas Hajny XHajT03 at hajny.biz
Tue Mar 9 12:04:45 CET 2021

On 2021-03-09 09:46, Graeme Geldenhuys via fpc-pascal wrote:
> On 09/03/2021 1:44 am, Tomas Hajny via fpc-pascal wrote:
>> UnicodeString may be used in a program simply because the included 
>> unit
>> has it used in its interface. That may be the case even if there's no
>> use of characters outside of US ASCII at all.
> So FPC rather goes with the fact that data may be *silently* lost 
> during
> encoding conversions? That doesn't seem like a safe default behaviour 
> to
> me.

The same happens e.g. if you configure your terminal to use a font that 
doesn't contain all the characters which may appear in the output - the 
compiler cannot know all the circumstances and thus cannot handle all of 
them; among others due to the fact that there are decisions to be made 
based on weighing pros and cons in the particular use case and those 
simply aren't 'one size fits all'.


More information about the fpc-pascal mailing list