C ++扩展的Ascii字符 [英] C++ Extended Ascii characters

查看:96
本文介绍了C ++扩展的Ascii字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检测C ++字符数组中是否存在扩展ASCII值(128至255).

How to detect the presence of Extended ASCII values (128 to 255) in a C++ character array.

推荐答案

请记住,没有扩展ASCII之类的东西. ASCII以前是且仅在0到127之间定义.以上所有内容均无效,或者需要采用ASCII以外的已定义编码(例如ISO-8859-1).

Please remember that there is no such thing as extended ASCII. ASCII was and is only defined between 0 and 127. Everything above that is either invalid or needs to be in a defined encoding other than ASCII (for example ISO-8859-1).

请阅读每个软件开发人员绝对绝对要了解Unicode和字符集的绝对最低要求(否借口!).

除此之外:遍历并检查任何大于127的值(或使用带符号的char时为< 0)有什么问题?

Other than that: what's wrong with iterating over it and check for any value > 127 (or <0 when using signed chars)?

这篇关于C ++扩展的Ascii字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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