This is a really long-standing issue in my work, that I realize I still don t have a good solution to...
C naively defined all of its character test functions for an int:
int isspace(int ch);
但是,char常常是签字的,其全部特性往往与胎盘或用于铺面的单一储存库相符合***。
And these functions have been the logical template for current C++ functions and methods, and have set the stage for the current standard library. In fact, they re still supported, afaict.
因此,如果你是空间(*pchar),你可以最终解决签署延期问题。 他们难以见到,因此,他们不得不在我的经验中防范。
同样,由于空间是空洞的,而且由于实际上的宽度往往不为人所知,因此,任何现代性质的图书馆都绝不应围绕果园或果园,而只是指点人/中介人,因为只有通过分析品的特性,你才能知道其中多少是单一逻辑的,我就知道如何最好地处理问题而损失了多少?
我期望有一个真正强大的图书馆,其基础是粉碎任何特性的大小要素,只修饰(提供像空间这样的东西),但要么错失了,要么在你们所有人(知道你做些什么)使用......的情况下,找到另一个更简单的解决办法。
** These issues don t come up for fixed-sized character-encodings that can wholly contain a full character - UTF-32 apparently is about the only option that has these characteristics (or specialized environments that restrict themselves to ASCII or some such).
So, my question is:
“你对白天空间的测试,可以印成像等,这样就有两个问题:
1) Sign expansion, and
2) variable-width character issues
毕竟,大多数character encodings 是可变的:UTF-7、UTF-8、UTF-16,以及诸如Shft-JIS等较老标准。 即便是扩大的ASCII,如果汇编者将果园视作已签署8个借方单位的话,也会有简单的信号延伸问题。
Please note:
不管贵格体的种类大小如何,这在多数特性上都是错误的。
这个问题存在于标准C图书馆以及C++标准图书馆;这些图书馆仍然试图通过周围的果园和果园,而不是各种空间的扼杀装置,是印页等。
实际上,这恰恰是那些打破了所困的通用性的职能类型:扼杀。 如果它仅仅在储存库中工作,并且没有试图将储存库的含义视为合乎逻辑的性质(例如空间),那么抽象就会更加诚实,迫使我们的方案者在其他地方寻找有效的解决办法。
Thank You
Everyone who participated. Between this discussion and WChars, Encodings, Standards and Portability I have a much better handle on the issues. Although there are no easy answers, every bit of understanding helps.