FOSS
OpenOffice.org on Mac OS X - Bullet point corruption fixed
Submitted by craiga on Sat, 08/01/2009 - 19:05.One continuous gripe I have with OpenOffice.org on Mac OS X is the apparent failure to properly handle bullet points. It only affects MS Word .doc format, and looks something like this:
This is apparently caused by the .doc format itself. Saving a .doc file in Word or OpenOffice.org and opening it in OOo will result in this bug. It is caused by a complete encoding failure on the part of the Word document format for bullet point symbols, as it explicitly looks for a particular glyph in the Symbol font rather than looking for the Unicode code point for the character. So, on machines that don't have the Windows version of Symbol.ttf installed ... it simply displays a nonsense character. OS X has its own Symbol font with different glyphs.
Fortunately the workaround for this is very simple. You can use font substitution to make OOo look at a "Symbol compatible" font for the glyph - in this case, OpenSymbol. Open the preferences panel and navigate to the Fonts page. Then, enter a font substitution for Symbol to OpenSymbol, to be applied Always.
This will take effect immediately, so any documents you have open will magically get their bullet points back. Smashing! Here is the same document immediately after closing the preferences window:
Twitter, part deux
Submitted by craiga on Wed, 02/11/2009 - 12:18.Some many moons ago now, I had a little rant about a new scourge on the internets ... the beast that is Twitter. In it, I said that I can understand the draw of social messaging (I use IRC and IM, so the concept is not alien to me) but that I can't understand the point of sending out details of the minutiae of your life to complete strangers. However, a long time has passed since I wrote that post, so I thought it time to revisit. Why? Well, simply because I've been actively using Twitter for a while now. Yes, I have been sucked in. Bugger.
VirtualBox Guest Additions on Linux guests
Submitted by craiga on Mon, 02/02/2009 - 14:22.This is just a quick post to remind myself how to do this, because for some reason I keep forgetting ... It might come in handy for others though!
If you're installing the VirtualBox Guest Addition on a Linux guest, you might have problems with display resizing, mouse capture, and complete breakage if you upgrade your kernel. This is easily fixed. Just installed DKMS (Dynamic Kernel Module Support) before running the VBoxLinux*.sh script for your architecture.
This handily enables automatic recompilation of the VirtualBox kernel modules if you change your kernel, and in my case, also actually makes them work in the first place. Double win! Hope this helps somebody. If not, it can just be a post to jog my memory in the future.
MegaHAL/Irssi - All new version 2.0!
Submitted by craiga on Sat, 03/22/2008 - 15:17.I've just finished rewriting my MegaHAL/Irssi script to be a lot cleaner and a lot easier to configure. You can get it from the MegaHAL/Irssi page.
New features include:
- Configurable using standard Irssi /set commands instead of hacking the script
- Supports changing nick without hacking the script
- Generally requires less hacking of the script ...
So, erm, yes. Enjoy!
VBA Unicode done right, redux
Submitted by craiga on Mon, 03/03/2008 - 13:07.Some time ago I wrote a short article on forcing VBA to use some form of unicode to allow simple insertion of non-latin1 text into VBA modules. It sort of worked, for the most part, kind of. Well, it didn't. The problem is down to the VBA editor being locked to the local encoding of the machine it is running on. You can only type characters from BIG5 in China, Shift-JIS in Japan, and so on. If you have a need to make a VBA module that uses strings suitable for all locales ... you're pretty much stuffed.
Except you're not. If you do it properly, you can have any unicode character displayed in any VBA locale. So how do you do it properly? Well, you're supposed to use ChrW$() to generate unicode characters individually. Yes. Really.
Nokia 800^H^H^H770
Submitted by craiga on Sun, 02/03/2008 - 21:19.Thanks to the sterling efforts of the chaps over at Maemo.org, I know have the ability to run the Nokia 800 OS, known as OS2007, on my Nokia 770. Flashing the new OS onto the machine was simplicity itself, given that a new FIASCO image is available and can be flashed in the usual manner.
So once it's all working, what can you expect? Well, my personal list of favourite new features is as follows:
- Better look over all, especially the two on-screen keyboards
- MUCH better Bluetooth support, including OBEX
- Native support for Bluetooth keyboards and GPS devices
- Automatic join of trusted networks on power on
- Later versions of everything available
- It might just be me, but it seems faster, too
There is rough to go with the smooth, though. One problem I've found is that the kernel included doesn't have smbfs support. If you use something like smbbrowser to connect to Samba shares on your network then you're stuck (at least, I think. I'll check for a solution.) There are also some battery life issues that might need sorting. The most major ones are the media metadata scanner going mad, and the internal alarm manager turning the device on at odd times.
If you notice, either through top or some other means, that metalayer-crawl is using up a lot of CPU time and draining your battery, then you might need to limit its scope somewhat. This is well described in bug 978. Metalayer-crawl is a simple program that indexes the identifying tags on media files stored on the system (e.g. mp3s), but it seems to get somewhat confused by symlinks and can easily end up recursively indexing the entire system forever. The fix for this bug simply causes it to only index files in the user's media directories.
Secondly, there is a strange problem with some devices that a 'hidden' alarm turns the device on at odd times. This simply needs the hidden alarm removing. First, become root, then run:
$ /mnt/initfs/usr/bin/retutime -A ''
This simply removes all hidden alarm events. You could set custom alarm events with this utility if you wanted. I'll leave that as an exercise for the reader.
A final little tip that I quite like is the ability to use a long press of the power button to put the device into 'soft off' mode. This is basically the same mode as the device enters when the screen cover is put on, but sometimes it's nice to be able to access it without having to put the cover on. This is especially true if you're just temporarily putting it to sleep while you're otherwise engaged, and have power, USB or earphones plugged in.
To enable this feature, become root and edit the file /etc/mce/mce.ini. Find this line:
PowerKeyLongAction=poweroff
and replace it with:
PowerKeyLongAction=softpoweroff
Reboot the device and your new soft power off mode will work. Press and hold the power button in the usual way to turn it back on in a jiffy.
MegaHAL, Irssi, and very, very rude bots
Submitted by craiga on Sun, 01/13/2008 - 02:34.One of the joys of IRC is the opportunity to write scripts, bots and toys that are not only entirely pointless, but also sometimes quite profane. A little AI script I knocked up to integrate MegaHAL with Irssi has gone through a number of lobotamies and now has the number of every regular member of the channel in which it is resident. Those members know who they are and what the bot in question thinks of them ...
Anyway, I put the script on my Irssi script page and it seems to be quite popular. Unfortunately, I hacked the AI::MegaHAL module from CPAN, installed only half the standard MegaHAL 9.1.1 distribution and generally made what can only be described as a one-of-a-kind bot. However, I decided to make it right, and the script now has some ... installation instructions!
So if you run Irssi and want to use an AI to provide fun and games in channel, or just to talk for you when you're too lazy even to spod, then grab the script and instructions from my megahal_irssi.pl page, install it, and have lots of fun.
MegaHAL/Irssi
Having an artificial intelligence in your channel is sometimes fun, so here's a way of integrating MegaHAL with Irssi for fun and games. It uses four major components.
First, you'll need the MegaHAL Perl module installing. Grab the megahal-9.1.1 source and untar it. Change to megahal-9.1.1/Megahal (the Perl module directory), build it and install it using the Makefiles provided. That's the only part of the MegaHAL distribution you'll need.
Týpïñg Àll Chäráçtêrs ìn Wiñdøws - Üpdátêd
Submitted by craiga on Tue, 01/08/2008 - 15:30.Working at a company that produces software to assist in machine translation of documents, staffed by people from all over the world, it's sometimes handy to be able to type non-english characters. Windows doesn't exactly make that easy. If you have a keyboard for the language in question it is fine, because you can use various mode switch and shift keys to build up the keystrokes required to get the necessary characters.
Unfortunately, I don't have all those shift keys and switch modes and such. I'm English, and get lumbered with the most basic keyboard in the world. I have no extra keys. Now, on a Mac or Unix machine it's OK. The Mac uses option+key to create umlauts, graves and so on, and anything running X11 can use a compose key to make just about any character known to man. Windows is rather more ... arcane. You can press altGr+key and see what you get, but that seems to be pretty much random and changes system to system, or you can hold alt and type out the unicode number for the character you want.
lookupbot.pl
The lookupbot.pl script has a variety of triggers that will hit the relevent website, scrape the content and return it in text form through IRC. Each one takes a specific parameter or search term, and a simple hash of triggers and function references means that more triggers can be added very easily.
