My code just scrapes a web page, then converts it to Unicode. html = urllib.urlopen(link).read() html.encode("utf8","ignore") self.response.out.write(html) But I get a UnicodeDecodeError: Traceback (most recent call last): File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/__init__.py",...
Charset issues are confusing and complicated by themselves, but on top of that you have to remember exact names of your charsets. Is it "utf8"? Or "utf-8"? Or maybe...
I’m using an ‘&‘ symbol with HTML5 and UTF-8 in my site’s <title>. Google shows the ampersand fine on its SERPs, as do all the browsers in their titles....
I’m really confused with the codecs.open function. When I do: file = codecs.open("temp", "w", "utf-8") file.write(codecs.BOM_UTF8) file.close() It gives me the error UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xef...
I’m trying to parse some HTML using DOMDocument, but when I do, I suddenly lose my encoding (at least that is how it appears to me). $profile = "<div><p>various...
I’m pulling data out of a Google doc, processing it, and writing it to a file (that eventually I will paste into a WordPress page). It has some non-ASCII...
What is ANSI encoding format? Is it a system default format? In what way does it differ from ASCII? 10 Answers 10
I’d like to add the Unicode skull and crossbones to my shell prompt (specifically the ‘SKULL AND CROSSBONES’ (U+2620)), but I can’t figure out the magic incantation to make...
What was the original historical use of the vertical tab character (\v in the C language, ASCII 11)? Did it ever have a key on a keyboard? How did...
In Java, I have a String and I want to encode it as a byte array (in UTF8, or some other encoding). Alternately, I have a byte array (in...