1
0
mirror of https://github.com/golang/go synced 2024-11-25 13:07:57 -07:00

codereview: handle UTF-8 in message descriptions

what a terrible way to implement strings

R=r
https://golang.org/cl/156116
This commit is contained in:
Russ Cox 2009-11-20 11:19:16 -08:00
parent d324a851c4
commit caf15f855d

View File

@ -1310,7 +1310,7 @@ class FormParser(HTMLParser):
self.handle_data("&" + name + ";") self.handle_data("&" + name + ";")
def handle_data(self, data): def handle_data(self, data):
if self.curdata is not None: if self.curdata is not None:
self.curdata += data self.curdata += data.decode("utf-8").encode("utf-8")
# XML parser # XML parser
def XMLGet(ui, path): def XMLGet(ui, path):