[fpc-pascal] {$modeswitch unicodestring}
    Jonas Maebe 
    jonas.maebe at elis.ugent.be
       
    Wed May 11 11:06:26 CEST 2016
    
    
  
Graeme Geldenhuys wrote on Wed, 11 May 2016:
> On 2016-05-11 09:58, Jonas Maebe wrote:
>> It does not avoid "the issues". All that modeswitch does is make
>> "String" an alias for "Unicodestring" in the declaring module.
>
> Am I correct in understanding that it only affects individual units. So
> using it in my application, it would not affect the meaning of String in
> the RTL for instance (String in the RTL still means
> AnsiString(<whatever_default_codepage>) )?
Indeed, just like any other {$mode xxx} and {$modeswitch xxx}  
directive. I don't think we have any directive or switch that can  
cross compilation unit boundaries.
Technically, it would also be very hard to make e.g. {$modeswitch  
unicodestring} affect other units that you use. After all, the source  
code for those other units may not be available, and they would have  
to be recompiled if the meaning of "string" changed in their source  
code.
Jonas
    
    
More information about the fpc-pascal
mailing list