If you're looking for a way to encode text - for protecting email links for example - you can use this form to encode a short string:Text to be HTML-encoded: Output: For other types of encoding in JavaScript or PHP refer to the article Escaping Special Characters. Encoding is handled ...
P.S.資料庫存入和讀取以及self.request拿到的參數預設就都是unicode string,若是要把byte string轉unicode string可以這樣轉unicode(unicodestring,"utf-8") 這樣就再也不會有"UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)"的問題產生了 遇到噴出這種錯...