ascii characters switch

ascii = {}

ascii[‘ ‘] = ‘ ‘
ascii[‘!‘] = ‘!‘
ascii[‘"‘] = ‘\"‘
ascii[‘#‘] = ‘#‘
ascii[‘$‘] = ‘$‘
ascii[‘%‘] = ‘%‘
ascii[‘&‘] = ‘&‘
ascii[‘'‘] = ‘\‘‘
ascii[‘(‘] = ‘(‘
ascii[‘)‘] = ‘)‘
ascii[‘*‘] = ‘*‘
ascii[‘+‘] = ‘+‘
ascii[‘,‘] = ‘,‘
ascii[‘-‘] = ‘-‘
ascii[‘.‘] = ‘.‘
ascii[‘/‘] = ‘/‘
ascii[‘0‘] = ‘0‘
ascii[‘1‘] = ‘1‘
ascii[‘2‘] = ‘2‘
ascii[‘3‘] = ‘3‘
ascii[‘4‘] = ‘4‘
ascii[‘5‘] = ‘5‘
ascii[‘6‘] = ‘6‘
ascii[‘7‘] = ‘7‘
ascii[‘8‘] = ‘8‘
ascii[‘9‘] = ‘9‘
ascii[‘:‘] = ‘:‘
ascii[‘;‘] = ‘;‘
ascii[‘<‘] = ‘<‘
ascii[‘=‘] = ‘=‘
ascii[‘>‘] = ‘>‘
ascii[‘?‘] = ‘?‘
ascii[‘@‘] = ‘@‘
ascii[‘A‘] = ‘A‘
ascii[‘B‘] = ‘B‘
ascii[‘C‘] = ‘C‘
ascii[‘D‘] = ‘D‘
ascii[‘E‘] = ‘E‘
ascii[‘F‘] = ‘F‘
ascii[‘G‘] = ‘G‘
ascii[‘H‘] = ‘H‘
ascii[‘I‘] = ‘I‘
ascii[‘J‘] = ‘J‘
ascii[‘K‘] = ‘K‘
ascii[‘L‘] = ‘L‘
ascii[‘M‘] = ‘M‘
ascii[‘N‘] = ‘N‘
ascii[‘O‘] = ‘O‘
ascii[‘P‘] = ‘P‘
ascii[‘Q‘] = ‘Q‘
ascii[‘R‘] = ‘R‘
ascii[‘S‘] = ‘S‘
ascii[‘T‘] = ‘T‘
ascii[‘U‘] = ‘U‘
ascii[‘V‘] = ‘V‘
ascii[‘W‘] = ‘W‘
ascii[‘X‘] = ‘X‘
ascii[‘Y‘] = ‘Y‘
ascii[‘Z‘] = ‘Z‘
ascii[‘[‘] = ‘[‘
ascii[‘\‘] = ‘\\‘
ascii[‘]‘] = ‘]‘
ascii[‘^‘] = ‘^‘
ascii[‘_‘] = ‘_‘
ascii[‘`‘] = ‘`‘
ascii[‘a‘] = ‘a‘
ascii[‘b‘] = ‘b‘
ascii[‘c‘] = ‘c‘
ascii[‘d‘] = ‘d‘
ascii[‘e‘] = ‘e‘
ascii[‘f‘] = ‘f‘
ascii[‘g‘] = ‘g‘
ascii[‘h‘] = ‘h‘
ascii[‘i‘] = ‘i‘
ascii[‘j‘] = ‘j‘
ascii[‘k‘] = ‘k‘
ascii[‘l‘] = ‘l‘
ascii[‘m‘] = ‘m‘
ascii[‘n‘] = ‘n‘
ascii[‘o‘] = ‘o‘
ascii[‘p‘] = ‘p‘
ascii[‘q‘] = ‘q‘
ascii[‘r‘] = ‘r‘
ascii[‘s‘] = ‘s‘
ascii[‘t‘] = ‘t‘
ascii[‘u‘] = ‘u‘
ascii[‘v‘] = ‘v‘
ascii[‘w‘] = ‘w‘
ascii[‘x‘] = ‘x‘
ascii[‘y‘] = ‘y‘
ascii[‘z‘] = ‘z‘
ascii[‘{‘] = ‘{‘
ascii[‘|‘] = ‘|‘
ascii[‘}‘] = ‘}‘
ascii[‘~‘] = ‘~‘
source_str = ‘‘‘
<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:c=\"http://www.w3.org/2001/XMLSchema\"><request xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\"><a:Parameters xmlns:b=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\"><a:KeyValuePairOfstringanyType><b:key>Query</b:key><b:value i:type=\"a"
        ":FetchExpression\"><a:Query><fetch aggregate='true' ><entity name='postfollow' > <attribute name='regardingobjectid' aggregate='countcolumn' alias='countFollowers' /> <attribute name='regardingobjecttypecode' groupby='true' alias='regarding' /> <attribute name='regardingobjectid' aggregate='countcolumn' alias='"
        "f3e34a23856443b0b36611e6930629d4' /> <filter type='and'><condition attribute='ownerid' operator='eq' value='{95C3F25C-7E84-E411-80BF-005056A80DE8}' /><condition attribute='regardingobjectid' operator='ne' value='{95C3F25C-7E84-E411-80BF-005056A80DE8}' /> </filter></entity></fetch></a:Query></b:value></a"
        ":KeyValuePairOfstringanyType></a:Parameters><a:RequestId i:nil=\"true\" /><a:RequestName>RetrieveMultiple</a:RequestName></request></Execute></s:Body></s:Envelope>
‘‘‘
source_str = source_str.replace(‘\"\n\t\t\"‘, ‘‘)

for k, v in ascii.iteritems():
    source_str = source_str.replace(k, v)

print source_str
时间: 2024-12-27 07:47:15

ascii characters switch的相关文章

ASCII Characters

http://www.freeformatter.com/html-entities.html Character Entity Name Entity Number Description     Space !   ! Exclamation mark "   " Quotation mark #   # Number sign $   $ Dollar sign %   % Percent sign & & & Ampersand '   ' Apostr

ASCII 码对应表

Macron symbol ASCII CODE 238 : HTML entity : [ Home ][ español ] What is my IP address ? your public IP address is: 118.163.184.243 ASCII control characters 00NULL(Null character) 01SOH(Start of Header) 02STX(Start of Text) 03ETX(End of Text) 04EOT(E

ASCII Art

Conmajia, 2012 Updated on Feb. 18, 2018 What is ASCII art? It's graphic symbols formed by ASCII characters instead of colorful pixels. ASCII art is an old technique when the network was not that developed as today. Net bandwidth was so limited and ex

The Portable Executable File Format from Top to Bottom(每个结构体都非常清楚)

The Portable Executable File Format from Top to Bottom Randy KathMicrosoft Developer Network Technology Group Created: June 12, 1993 Click to open or copy the files in the EXEVIEW sample application for this technical article. Click to open or copy t

训练赛题解

突然想到好久以前做完这份题目没写题解.蛮来写写吧.很多细节已经忘记了.. 第一题 很简单的字符串比对是否b包含a.不包含就报NO,包含就YES..坑爹的第一次!!.把strlen放在了for循环里面..就超时了..超时了.. 注意:for里面的条件每次也会重新计算. A - All in All Time Limit:1000MS     Memory Limit:30000KB     64bit IO Format:%I64d & %I64u Submit Status Practice P

802.11学习笔记1-WIFI参数含义

研究下wifi参数的含义 #The word of "Default" must not be removed Default CountryRegion=5 CountryRegionABand=7 CountryCode= SSID=Dennis2860AP NetworkType=Infra WirelessMode=9 Channel=0 BeaconPeriod=100 TxPower=100 BGProtection=0 TxPreamble=0 RTSThreshold=

hbase官方文档(转)

Apache HBase™ 参考指南  HBase 官方文档中文版 Copyright © 2012 Apache Software Foundation.保留所有权利. Apache Hadoop, Hadoop, MapReduce, HDFS, Zookeeper, HBase 及 HBase项目 logo 是Apache Software Foundation的商标. Revision History Revision 0.95-SNAPSHOT 2012-12-03T13:38 中文版

smtp

Network Working Group J. Klensin, EditorRequest for Comments: 2821 AT&T LaboratoriesObsoletes: 821, 974, 1869 April 2001Updates: 1123Category: Standards Track Simple Mail Transfer Protocol Status of this Memo This document specifies an Internet stand

Linux命令行音乐播放器moc

moc(Music On Console,播放器程序是mocp,在Arch Linux的Commity中有个tray版本的moc,启动时会在面板上显示一个图标,能直接启动mocp服务和播放器.甚至还能让osdlyrics加载桌面歌词,不过这很卡.)适用于命令行,在黑乎乎的Linux核心控制台(字符界面)上也能成功启动和播放,但Linux核心控制台默认是没有中文支持的,可以试试能显示中文的fbterm(直接从核心控制台启动,不需要运行X服务)如果需要的话.即便如此,正常使用仍然需要一番手动配置才行