Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- codepointnums = []
- for codepoint in codepoints:
- codepointnums.append(ord(codepoint))
- codepointnums.sort()
- for codepoint in codepointnums:
- print(hex(codepoint))
- dataencoded=datadecoded.encode("cp1254")
- dataencoded=datadecoded.encode("macroman")
- f2=open("sQNc0Bsr.gif","wb")
- f2.write(dataencoded)
- f2.close()
- crcount = 0
- lfcount = 0
- crlfcount = 0
- for p in range(1,len(dataencoded)):
- byte = dataencoded[p]
- bytem1 = dataencoded[p-1]
- if (byte != 0x0A) and (bytem1 == 0x0D):
- crcount += 1
- if (byte == 0x0A) and (bytem1 != 0x0D):
- lfcount += 1
- if (byte == 0x0A) and (bytem1 == 0x0D):
- crlfcount += 1
- print(crcount,lfcount,crlfcount)
Add Comment
Please, Sign In to add comment