Viewing a response to: @oflyhigh/ascii-gb2312-unicode-utf-8
说到 ASCII 我就想到一件让我来气的事,很好笑: 我以前有一个程式中需要识别几个按键,那个程序是纯 C 写的(C99),然后一开始在 Linux 下写,用 getch() 来获取键,然后写了个宏来判断操作系统,来适配 win;结果 Linux 方向键和 win 下的方向键的 ascii 值不一样,win 下测试不通过,当时已经 release 了。马上开始修,结果测试出来,按两下同一个方向键,在 win 下返回的 ascii 值居然不同? 后来才发现,win 下面功能键都会先返回一个 ascii 值(好像是 31,不记得了),告诉你:接下来这个键是功能键!然后再返回真实键值。调试了许久。
author | coder-bts |
---|---|
permlink | re-oflyhigh-ascii-gb2312-unicode-utf-8-20180428t142526092z |
category | encoding |
json_metadata | {"tags":["encoding"],"community":"busy","app":"busy/2.4.0"} |
created | 2018-04-28 14:25:27 |
last_update | 2018-04-28 14:25:27 |
depth | 1 |
children | 2 |
last_payout | 2018-05-05 14:25:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.224 HBD |
curator_payout_value | 0.071 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 301 |
author_reputation | 2,427,587,640,530 |
root_title | 温故而知新:复习一下字符编码(ASCII、GB2312、Unicode、UTF-8、区位码) |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 52,652,575 |
net_rshares | 46,491,357,560 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
oflyhigh | 0 | 46,491,357,560 | 2% |
识别按键,一看就是要做坏事
author | oflyhigh |
---|---|
permlink | re-coder-bts-re-oflyhigh-ascii-gb2312-unicode-utf-8-20180429t004800792z |
category | encoding |
json_metadata | {"tags":["encoding"],"app":"steemit/0.1"} |
created | 2018-04-29 00:48:03 |
last_update | 2018-04-29 00:48:03 |
depth | 2 |
children | 1 |
last_payout | 2018-05-06 00:48:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 13 |
author_reputation | 6,269,738,073,419,739 |
root_title | 温故而知新:复习一下字符编码(ASCII、GB2312、Unicode、UTF-8、区位码) |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 52,733,211 |
net_rshares | 0 |
没有没有,就方向键识别需求
author | coder-bts |
---|---|
permlink | re-oflyhigh-re-coder-bts-re-oflyhigh-ascii-gb2312-unicode-utf-8-20180429t032537316z |
category | encoding |
json_metadata | {"tags":["encoding"],"community":"busy","app":"busy/2.4.0"} |
created | 2018-04-29 03:25:36 |
last_update | 2018-04-29 03:25:36 |
depth | 3 |
children | 0 |
last_payout | 2018-05-06 03:25:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 13 |
author_reputation | 2,427,587,640,530 |
root_title | 温故而知新:复习一下字符编码(ASCII、GB2312、Unicode、UTF-8、区位码) |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 52,751,178 |
net_rshares | 0 |