Category > Python

Python and utf-8: force_unicode

Character encoding is the worst thing ever invented. Hopefully somebody invented Unicode and UTF-8 and UTF-32. For me, UTF-8 is, and should be, the standard for saving and sending text strings all over the world. Programming languages (even Python) should only support UTF-8 as input, be it from console, from a file, or from a […]

Continue reading

, , , ,

http_build_query implemented in Python

I implemented a function in Python that mimics http_build_query function. ## # Mimics the behaviour of http_build_query PHP function # This method can be useful for sending data to flash applications ################################################## def http_build_query(params, topkey = ”): from urllib import quote   if len(params) == 0: return ""   result = ""   # is […]

Continue reading

, ,

prev posts