Why are some character constants 1 byte wide and others 2 byte wide?

I thought I was starting to understand Unicode, but it hits me:

const c1 = #1; --> SizeOf() = 2 c2 = #33; --> SizeOf() = 2 c3 = #127; --> SizeOf() = 2 c4 = #128; --> SizeOf() = 1 c5 = #160; --> SizeOf() = 1 c6 = #161; --> SizeOf() = 1 c7 = #255; --> SizeOf() = 1 

Can anyone explain? Delphi XE2, default Windows-1252 codepage

Thanks yang

+4
source share
1 answer

This is documented - see the $ HIGHCHARUNICODE directive

+8
source

Source: https://habr.com/ru/post/1432694/


All Articles