トップ 一覧 検索 ヘルプ RSS ログイン

BugTrack-その他のメモ/34の変更点

- 	def _trans(self, txt, charset='sjis'):
- 		aa = hexStr.findall(txt)
- 		aaa = ''
- 		for m in aa:
- 			if m[1] != '':
- 				aaa = aaa + m[0] + re.sub('0x','',hex(ord(m[1])))
- 			else:
- 				aaa = aaa + m[0]
- 		bbb = aaa.decode("hex").decode(charset)
- 		return urllib.unquote_plus(bbb)
+ def _trans(self, txt, charset='sjis'):
+ 	aa = hexStr.findall(txt)
+ 	aaa = ''
+ 	for m in aa:
+ 		if m[1] != '':
+ 			aaa = aaa + m[0] + re.sub('0x','',hex(ord(m[1])))
+ 		else:
+ 			aaa = aaa + m[0]
+ 	bbb = aaa.decode("hex").decode(charset)
+ 	return urllib.unquote_plus(bbb)