ASCII Table and Description

本文详细介绍了ASCII码的概念及其历史背景,并提供了完整的ASCII字符对照表。解释了ASCII码如何用于信息交换,以及非打印字符的用途。此外还介绍了扩展ASCII码的相关知识。
[b]ASCII Table and Description[/b]

ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of some sort. ASCII was developed a long time ago and now the non-printing characters are rarely used for their original purpose. Below is the ASCII character table and this includes descriptions of the first 32 non-printing characters. ASCII was actually designed for use with teletypes and so the descriptions are somewhat obscure. If someone says they want your CV however in ASCII format, all this means is they want 'plain' text with no formatting such as tabs, bold or underscoring - the raw format that any computer can understand. This is usually so they can easily import the file into their own applications without issues. Notepad.exe creates ASCII text, or in MS Word you can save a file as 'text only'

[img]http://dl.iteye.com/upload/attachment/0071/6154/db5555d0-2fac-366a-bb26-6ac6124e9931.gif[/img]

[b]Extended ASCII Codes[/b]

[img]http://dl.iteye.com/upload/attachment/0071/6156/ae167cb6-d8a7-37c8-bc66-78d25d62b64c.gif[/img]
import sqlite3 import json try: # 连接到 SQLite 数据库 conn = sqlite3.connect('myWords_v5.db') cursor = conn.cursor() # 检查表名是否正确 table_name = 'actual_table_name' query = f"SELECT * FROM {table_name} WHERE name LIKE '%新课标%' AND level_name = '初中' AND `def` IS NOT NULL" cursor.execute(query) # 获取查询结果 results = cursor.fetchall() # 获取列名 column_names = [description[0] for description in cursor.description] except sqlite3.Error as e: print(f"数据库操作出错: {e}") results = [] # 若出现错误,将 results 初始化为空列表 finally: # 关闭游标和连接 if cursor: cursor.close() if conn: conn.close() # 将查询结果转换为字典列表 data = [] if results: for row in results: row_dict = dict(zip(column_names, row)) data.append(row_dict) # 将数据保存为 JSON 文件 try: with open('output.json', 'w', encoding='utf-8') as f: json.dump(data, f, ensure_ascii=False, indent=4) print("数据已成功保存为 output.json") except Exception as e: print(f"保存 JSON 文件时出错: {e}") import sqlite3 import json try: # 连接到 SQLite 数据库 conn = sqlite3.connect('myWords_v5.db') cursor = conn.cursor() # 检查表名是否正确 table_name = 'actual_table_name' query = f"SELECT * FROM {table_name} WHERE name LIKE '%新课标%' AND level_name = '初中' AND `def` IS NOT NULL" cursor.execute(query) # 获取查询结果 results = cursor.fetchall() # 获取列名 column_names = [description[0] for description in cursor.description] except sqlite3.Error as e: print(f"数据库操作出错: {e}") results = [] # 若出现错误,将 results 初始化为空列表 finally: # 关闭游标和连接 if cursor: cursor.close() if conn: conn.close() # 将查询结果转换为字典列表 data = [] if results: for row in results: row_dict = dict(zip(column_names, row)) data.append(row_dict) # 将数据保存为 JSON 文件 try: with open('output.json', 'w', encoding='utf-8') as f: json.dump(data, f, ensure_ascii=False, indent=4) print("数据已成功保存为 output.json") except Exception as e: print(f"保存 JSON 文件时出错: {e}")
最新发布
10-16
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值