为什么有些字符常量1字节宽,而另一些2字节宽? [英] Why are some character constants 1 byte wide, and others 2 bytes wide?

查看:90
本文介绍了为什么有些字符常量1字节宽,而另一些2字节宽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以为我开始了解Unicode,但这使我不胜枚举:

I thought I was beginning to understand Unicode, but this beats 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 

有人可以解释吗?
Delphi XE2,默认Windows-1252代码页

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

感谢
Jan

Thanks Jan

推荐答案

已记录-请参见 $ HIGHCHARUNICODE 指令

这篇关于为什么有些字符常量1字节宽,而另一些2字节宽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆