Saved for later reference

online repository of stuff I had to google for hours to figure out – and random snippets of code

Preventing Java updates from installing Ask toolbar

Tags: , , , , , , ,

I found this tip on StackOverflow and wanted to mirror it here to go with my previous article on Java installs.

A Windows .reg file with

1
2
3
4
5
6
7
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]
"SPONSORS"="DISABLE"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft]
"SPONSORS"="DISABLE"

will make the installer “just install”, no questions asked, and no toolbars sneaking in.

Some downloads: A premade .reg file, and the .reg file renamed to .txt (in case browsers/virus scanners prevent the previous download). Always verify the contents of .reg files before running them.

Share

Patched libgmail for unicode handling

Tags: , , , , ,

libgmail 0.1.11 has a bug with unicode handling, when the sender of an email has a name with one or more non-ASCII character in it.

I’ve applied the patch I described in the link above, adding the function:

1
2
3
4
5
6
7
8
9
10
def to_unicode(xstr):
    '''
    Forces string to unicode
    '''

    if type(xstr) == unicode:
        return xstr
    elif type(xstr) == str:
        return xstr.decode('utf-8')
    else:
        return xstr

And changed all calls to var.decode(‘utf-8’) to to_unicode(var).

libgmail-0.1.11p1.zip (source package)
libgmail-0.1.11p1.win32.exe (win32 installer)

Share

© 2009 Saved for later reference. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.