Archive

Archive for the ‘Uncategorized’ Category

Firefox and incorrectly named plugins

September 9th, 2009 peter No comments

As it turns out, firefox on linux will only load plugins if they are named something.so. Hit this error when trying to use the latest 64 bit plugin (10.0.0.18.32) and wanted to keep the older version around with some symlink magic. Basically I had the following files:

libflashplayer.so.10.0.0.22
libflashplayer.so.10.0.0.32
libflashplayer.so -> libflashplayer.so.10.0.0.32

And firefox refused to use the plugins while both konqueror and chromium had no problems with them. Renaming the files (and symlink accordingly) to libflashplayer-10.0.0.32.so did the trick.

Deluge Torrent – a bug report

February 18th, 2009 peter No comments

Did my duty when it comes to Free software and reported a bug with the deluge torrent project.

http://dev.deluge-torrent.org/ticket/805

Categories: Uncategorized Tags: , , ,

PDF::Writer and Ruby on Rails

January 15th, 2009 peter 1 comment

Was struggling with an unbelievably annoying error, where PDF::Writer (or pdf-writer as it’s also called) simply refused to show special accented characters incl the Euro sign, but presented garbage instead. Turns out that as of pdf-writer 1.1.8, the following is the case:

a) No, it doesn’t accept utf-16, despite what it claims
b) Feeding it utf-8, will look fine for what can be mapped to 7bit ASCII
c) Feeding it Win-1252 seems to do the trick, although some people claim it’s also hit and miss.

In your class doing the PDF generation, add a method like this:

def to_pw(text = '')
  return Iconv.conv('win-1252', 'utf-8', text)
end

And then call that to output all the text.

YMMV, but it worked for me.

Categories: Uncategorized Tags: , ,