Most viewed recipes tagged "decode"http://code.activestate.com/recipes/tags/decode/views/2013-12-17T23:02:37-08:00ActiveState Code RecipesDecoding Binary Files (Python)
2011-03-15T00:11:10-07:00Yony Kochinskihttp://code.activestate.com/recipes/users/4175703/http://code.activestate.com/recipes/577610-decoding-binary-files/
<p style="color: grey">
Python
recipe 577610
by <a href="/recipes/users/4175703/">Yony Kochinski</a>
(<a href="/recipes/tags/binary/">binary</a>, <a href="/recipes/tags/decode/">decode</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/python/">python</a>).
Revision 2.
</p>
<p>One way to read files that contain binary fields is to use the <code>struct</code> module. However, to do this properly one must learn struct's format characters, which may look especially cryptic when sprinkled around the code. So instead, I use a wrapper object that presents a simple interface as well as type names that are more inline with many <a href="http://en.wikipedia.org/wiki/Interface_description_language">IDLs</a>.</p>
Perl URL encode and decode (Perl)
2010-11-02T17:52:46-07:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/577450-perl-url-encode-and-decode/
<p style="color: grey">
Perl
recipe 577450
by <a href="/recipes/users/4173505/">Trent Mick</a>
(<a href="/recipes/tags/decode/">decode</a>, <a href="/recipes/tags/encode/">encode</a>, <a href="/recipes/tags/url/">url</a>).
</p>
<p>URL encode and decode functions for Perl.</p>
No more UnicodeDecodeErrors when printing (Python)
2013-12-17T23:02:37-08:00Ádám Szieberthhttp://code.activestate.com/recipes/users/4188745/http://code.activestate.com/recipes/578788-no-more-unicodedecodeerrors-when-printing/
<p style="color: grey">
Python
recipe 578788
by <a href="/recipes/users/4188745/">Ádám Szieberth</a>
(<a href="/recipes/tags/decode/">decode</a>, <a href="/recipes/tags/error/">error</a>, <a href="/recipes/tags/print/">print</a>, <a href="/recipes/tags/terminal/">terminal</a>, <a href="/recipes/tags/unicode/">unicode</a>).
Revision 2.
</p>
<p>I hate getting UnicodeDecodeErrors when I use print() for bugtracing or for some other reason. I decided to make a module which spares me the headache.</p>