惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
月光博客
月光博客
V
Visual Studio Blog
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
SecWiki News
SecWiki News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
F
Full Disclosure
The Cloudflare Blog
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
AI
AI
N
News and Events Feed by Topic
T
Tor Project blog
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog

博客园 - Levins Dai

我知道你不知道我知道你不知道我知道你不知道 Pixel doubling, why's it there? Why does current running process always be mapped to slot 0? 金刚的爱 - Levins Dai - 博客园 What's the difference between GetThreadPriority and CeGetThreadPriority? How to send class 0 message on Windows Mobile 5.0? 新年音乐会 再说GSM SMS文字短信编码与长度 国家地理选美中国 木兰秋猎 - Levins Dai - 博客园 30 years anniversary of Microsoft Back from off site meeting 摄影是什么? Talking about Talking about 谈论谈论好男人 关于Naming的故事 两个星期,两条旧闻 On Board Day 3G和Windows XP 是卖书还是送书?
Windows Mobile 文字短信的长度 - Levins Dai
Levins Dai · 2005-11-10 · via 博客园 - Levins Dai

在Windows Mobile里面,可以很方便的编辑长度无限制的文字信息,pOutlook会自动把它分割成若干条短信(SMS),再把它们发送出去。但可能很多人也注意到了,在短信编辑窗口的最下面,有类似这样的一串字:"5/160"。很多人直观地认为160是一条短信的最大长度,5是当前输入文字的长度,但随后慢慢地可能发现,这个数字并不是想象的那么直观:

首先,对于不少老式的简体中文手机(比如Noika 8250),短信最大长度通常显示70,而为什么Windows Mobile会是160呢?难道文字短信的长度不应该是统一的标准吗?

其次,更有意思的是,当尝试在Windows Mobile短信编辑窗口里写入汉字的时候,数字160马上变成了70。这又是怎么回事?

产生所有这些令人困惑的问题的原因在于,160这个数字代表的是短信容纳的最多字符个数,而不是其最大长度。按照GSM 900/1800/1900的标准,文字短信的最大长度是140个字节,也就是1120个比特。然而,对于字符本身由于采用不同的编码方式,最后导致了字符个数的不同。显然,如果以每个字符7 bits进行编码(可以支持0-127的ASCII码),那么就是160个字符,这也就是Window Mobile缺省使用的方式。然而,对于双字节汉字而言,一个字符需要2个字节进行编码,因此,当短信内容包含汉字字符时,系统自动采用UCS-2编码,最大长度仅能达到70个字符。

最后,对于某些老式手机(比如上面提到的Nokia 8250),由于目标面对的是中国市场,可能忽略了这些差别,统统采用UCS-2编码,于是,即便你编写纯英文短信,仍然无法超过70字符的限制。