Tapzip and pipe

5 Aug 2008 12:45 by Rick

A little job I had to do today was to write a script (unix) to zip a file before transmitting it to a Windows system. No problem, we have zip installed…

zip file.zip file.txt

Then they decided that it was in ASCII Latin1 and they wanted it in UTF-8. Again, no problem

iconv -f ISO-8859-1 -t UTF-8 file.txt | zip file.zip -

The snag is that zip includes not only the compressed file in the output, but also headers giving details of the file name etc. In the case above the input comes from a pipe and there is no file name so it creates an entry called - (just a hyphen) which is not very useful. The unix unzip command has an option to get around this.

unzip -p file.zip > file.utf8

or you can use funzip if your implementation includes it.

funzip file.zip > file.utf8

I have no idea what they can do on Windows. I may have to do it the slow way and create an intermediate file with all the housekeeping, security and management that involves 🙁

Exercise for the reader: If you just unzip file.zip from above it creates a file called -. How do you do anything with it?

TapBuzz Off

2 Aug 2008 09:49 by Rick

Now it is not my place to question God’s creation, but sometimes I wonder why some things exist.

We have just come back from holiday (that is why it was quiet on here) and the only thing that marred a very enjoyable break were certain insects. First, mosquitoes and midges—I was bitten on the back of my right hand and it swelled up so I could no longer close it. This took well over a week to go down. We were both bitten in other places and the presence of these beasts stopped us from enjoying the mild evenings sitting in the gardens.

Then there were the wasps. Fortunately only a couple of times they messed up a lunchtime picnic. Perhaps it is an irrational fear since childhood but I can’t stand the things. I thought they were attracted to sweet things like jam, fizzy drinks and beer but these seemed to love salami and smelly cheese. We also had hornets, huge ones, but fortunately they weren’t interested in us, but they insisted on getting into the car every time a door was opened.

Finally when we got home the house was infested with flies—big black slow ones. By the time we arrived most of them were dead but everything needed to be cleaned from flyspots and the corpses cleaned up; there must have been several hundred. We can only suppose that something had died under the floor but there was no smell.

So, please God, perhaps if you are doing a post project review, could you reconsider the need for these creatures?

TapSneaky freeware

1 Aug 2008 09:06 by Rick

I was in the process of preparing a post on this subject, particularly relating to Adobe, Sun, Apple and AVG, but Scott Dunn has beaten me to it so go and read his article—it is really good.

It is sad that major companies should resort to these tactics. Where I work we have an Ethical Standards Policy and I would hope that we would never do anything like this. The policy has the underlying principle “Would it look bad if reported in a newspaper” which works pretty well. That way you don’t have to worry too much about the grey areas as they sort themselves out.

Never mind that the product you are supplying is free—live with it and grow your reputation, not use it as a marketing platform for other products.

TapNo need to SHOUT

8 Jul 2008 17:52 by Rick

The Apple aluminium keyboard (and, I am told, the built in keyboard on the MacBook Pro) has a feature that there is a short delay on the Caps Lock key so you have to hold it down a little bit longer before it takes effect. This is to guard accidentally writing emails and IM messages all in capitals. The guy who thought of that one should GET A BONUS, but I would like it adjustable—a little longer in my case.

Some people prefer to disable it completely and, I must admit, it is a pretty useless key.

TapWomen Bishops

7 Jul 2008 11:48 by Rick

The York meeting will decide whether to accommodate opponents to women bishops and if they could opt to remain under the ministry of male bishops instead.

BBC News

I may be missing something but I don’t see what all the fuss is about. Whatever your opinion, there is already a system in place to accommodate you. After the Women priests decision some 15 years ago dissenters had a special provision made for them. If your church wanted to stick to the old ways then, after certain procedures were completed, you could elect to come under the authority of the Bishop of Ebbsfleet rather than the Diocesan. Now, presuming that those who object to Women Bishops are a smallish superset of those, surely the same procedure can apply and, in the majority of cases, is probably already in effect. I suppose that there may be a small minority who approve of one but disapprove of the other but it would hardly be worth making a lot of fuss over.

TapAdobe vs. Clue ends in divorce

11:16 by Rick

Adobe started to lose it some years ago when some marketing wizard decided to re-brand Acrobat Reader and call it Adobe Reader. You still find even experienced system managers confusing the names and you are never quite sure if they are talking about the real Adobe Acrobat or just the Reader freebie.

So when they announced Adobe 9 I wasn’t sure at first if they meant the full product or just the Reader (or both). Especially as we have only just had the emergency patch for Reader 8.1.2. “What patch?” do I hear you ask. Well, to digress, it was very important because it fixed a security hole that could allow those safe files called PDFs to compromise your system. Open up Reader now and click on Help > Check for Updates and it should download a thing called “Security Update 1”. Not that you would realise when it is done because for some stupid reason, the version number is not changed so it still says Version 8.1.2. While we are on the subject, if you download the Windows patch by hand it is called AcrobatReaderUpd812SU1_all.msi so it seems even Adobe are confused by the name.

Now the rest of this is hearsay as I haven’t tried it myself yet but it seems that the new Adobe 9 has bundled together the PDF Reader which we generally tolerated with Flash, the product that Adobe bought from Macromedia and which we all love to hate. It also includes Acrobat.com and Adobe Air, neither of which I have heard of. That is a 33MB download and 200MB+ install for something to just read PDF files! Also beware of the Free eBay desktop which is automatically ticked for you.

I won’t be bothering on my Mac—Preview does the job for me just fine and my Windows systems can stick with Version 8.

TapResidents Parking Zone

6 Jul 2008 13:18 by Rick

Parking ConsultationParking cars is a real problem in our central city area and congestion is a big issue locally as well as nationally. When combined with lobbies from the Green interests as well it is a hot topic for debate. Recently the city council has issued a “consultation” document and a proposal to set one up in the greater urban area (there are already controls in the centre). The quotes are because it says a reasonable amount about the scheme but doesn’t allow much opportunity for response apart from directly lobbying the councillors. Also the public exhibitions are bang in the middle of the holiday season.

The initial thoughts were that it was a good idea. £40 per year does not seem unreasonable that a space, though not guaranteed, should be available. They say it is for administration and enforcement and, to adequately patrol the area will be expensive. A system that is not enforced will be worse than we have now. Studying it more closely we came up with some issues that they apparently have not considered (or are not telling us about). These thoughts may only apply to our immediate area and others have have a different experience. (Nice picture of our church on the front by the way.)

There is a neighbouring street, presumably within our zone, which contains a number of restaurants, bars and pubs. Their businesses will suffer if they cannot attract customers from a wide area due to no parking being available. Although we often curse the load this places on space in the evenings, it dramatically affects the character of where we live. The business permits don’t allow for this. Similarly, our church is inside a zone close by (the one in the picture); we usually walk, but worshippers come from all over. There is very limited off road space—no more than 8 cars. It may also force it to get officious and get stranger’s cars removed.

Parking Sceme MapWhat happens if our parking zone is full? The situation now is that we tour the area in ever increasing circles until we find a space but if those are barred to us due to being in another zone then what do we do? It rather depends on how large our zone is and what sort of streets it covers. They say a zone will be 300-500 households which does not seem very large.

Strictly enforced planning will need to be applied to stop the area being blighted by the loss of front gardens converted to off road parking. Also the practice of stripping the entire front garden to create a 25′ wide standing and corresponding haulage way must be stopped as this will remove a disproportionate number of street spaces. Indeed, existing wide haulage ways must be restricted to only that required for access.

They talk about providing double yellows (no parking) markings for corners and access ways. Although this is a serious problem with access to some roads becoming very difficult due to stupid parking, a strict adherence to the highway code requirements is unnecessary and would significantly curtail the available spaces.

Where does one buy visitors permits and what will be the arrangement for carry over to following years if too many were estimated. We will not be wanting to traipse down to the council house nor will we be happy to have too much capital tied up “just in case” nor if they expire prematurely.

Bus Map for RedlandThey will charge £80 for a second permit and this is not bank breaking either though it makes you think twice about needing a second car. The third is shown as £500—now this clearly has nothing to do with costs, this is to stop people even considering getting one. I can see that they might want to use it to restrict multiple occupancy houses in the area (mostly students around us) but some of the families have three people where an adult child is working in a different part of the city but has not yet left home. Why force them to set up independently when there is also a housing crisis. The public transport would have to be a lot better to compensate. Those of us who live in the centre often work on the outskirts and there are few bus services.They say that even a second permit will not be available in some (unspecified) zones. This would be unacceptable.

A final thought came from thinking deeply about our immediate area. I came to the conclusion that, apart from the bar/restaurant evening load, our parking problem is mostly self inflicted. Stopping non-residents parking will make no difference at all because they don’t. We are too far from the city centre for commuters. The only way that is likely to affect us is if restrictions closer in force the commuters out to our patch. If that is the case, then where do you draw the limit? So when it comes to it, we want to manage our own parking, with help if needed to enforce safety restrictions where necessary.

TapLiberalised top level domains

28 Jun 2008 13:19 by Rick

I wrote a while ago about how there were more top level domains than I was aware of—.aero, .museum etc. Well on Thursday ICANN, the controlling authority, voted to drop most restrictions and allow applications for any string of three or more letters not already allocated.

It is amazing, however, how most of the commenters to the article in The Register seem to have missed the point and/or not read the article. What this ruling does is allow organisations to register a Top Level Domain so that the sub domains (which are the ones actually used) can be allocated either on request or sub-letting. Each organisation will have to both put up a substantial sum of money (where that goes beyond the administration expenses is unclear) and provide an approved registration and regulatory mechanism to conrtol the lower levels. It is not for Tom, Dick, or ASDA to register fancy addresses for their own personal use.

This ruling also allows strings in alphabets other than the current Latin/Roman but it is not clear if digits will be available. An early use of this facility will be local alphabet equivalents for the national codes for Russia and China. This liberalisation was already coming for lower level domain names and some Cyrilic ones can already be seen. There are (supposed to be) rules to stop the use of characters that look like Roman ones to spoof look-alike addresses. The newer browsers have built in safeguards to warn you of this.

TapColour Management

24 Jun 2008 20:37 by Rick

To those who look carefully, photographs on web pages look dull compared to how they look in photo editors. I always thought it was due to the low resolution but apparently it is all about Colour Management Profiles. These are instructions placed in the image file which tell the receiver how to render the colours and are intended to allow matching on different devices—e.g. Screens on different computers, projectors and printers. However, Firefox has always ignored them; until Firefox 3. IE ignores them as well; Safari does read them but in a different way.

In Firefox, if you go to the about:config page and set gfx.color_management.enabled to True then, after a restart, it will be activated. All the photographs will look just a little bit richer, brighter and more sparkling. The photo purists are wondering why it has not been enabled by default?

Well if you have tried it in Windows you will see—everything else will have taken on a different tinge compared to what it was before, mine went pinkish, others have reported a cream bias. The greys are no longer neutral because in the process of doing it to photographs that come with built-in profiles, they have applied a default profile to everything else on the page and it all looks wrong. The official Mozilla page says that it relies on a properly calibrated monitor. Well mine is as close as I can get it without special hardware but that is not the answer. What you also need to do is set the default profile gfx.color_management.display_profile. You would expect this to be the actual values for your monitor, but that is what Firefox is already doing. What you need to do is set it to C:\WINDOWS\system32\spool\drivers\color\sRGB Color Space Profile.icm to stop Firefox altering it and allow the Windows display driver to make the correction for the screen. Brad Carlile has a good test page—if the greys still look grey and his three test pictures all look the same then you have got it right. The Apple Mac doesn’t seem to have a problem, just set the enabled flag to True and it mostly works. Safari (at least on the Mac) does it like this by default.

Secondly, plugins, particularly Flash, do not compensate, so sites that blend from backgrounds to Flash will no longer be seamless—but my fix seems to solve that as well, unless they are trying to blend Flash with JPG which would be unusual. I haven’t got this working for the Mac yet. and, although Flash blending is ok, apparently Safari falls down for a similar reason; the CSS and GIF backgrounds don’t blend seamlessly with JPG and PNG images. This may also affect my fix but I haven’t had a chance to experiment with it yet. What I need is another comprehensive test page. Update: It is a heavy read, but this page by G. Ballard explains it all and has a lot of test pictures or this excelent article by Jeffrey Friedl.

Finally, it also takes 10–15% more processor power to render the pictures so those on older systems will see a noticeable slow down on picture heavy sites.

I first though that I would be switching it off again until they get this sorted out properly, but having found the profile hack I will leave it, I don’t care about Flash anyway.

TapFirefox 3 Extensions

18 Jun 2008 11:12 by Rick

Even after the extended build-up and yesterday’s world-wide launch there are still a few extensions that haven’t been updated for Firefox version 3.

These are a few that I found that could be simply hacked to enable them to load. I haven’t altered the functionality at all, just changed the maximum version number to 3.* and tested them. They work on my system but you use them at your own risk on yours.

CacheViewer 0.4.7 — Update: Hacked version 0.4.7.99 Version 0.4.7.1 now available.

Stop-or-Reload Button 0.2.2 — The page says it works with Firefox 3 but it doesn’t. Hacked version 0.2.2.99

UK Threat Level 0.15 — Update: Hacked version 0.15.99 Version 0.16 now available.

British English Dictionary 1.19 — The page says it works with Firefox 3 but it doesn’t. Hacked version 1.19.99 supersedes my earlier version. This extension is also suitable for Thunderbird 2.*. It is not entirely clear if this dictionary is needed for Firefox 3 or if there is one built into the English (British) basic download.

View Cookies 1.7 is ok but for some reason won’t update automatically.

Update: Google Pagerank Status 0.9.8 — Although the web site doesn’t say so, the version there is now 0.9.9 and does support Firefox 3.

HTML Validator 0.8.4.1 (Mac OS X Intel) — It says that version 0.8.5.2 is now available but there is nothing on the other end of the link. Mac OS versions are made even though the official Firefox Add-ons page says they are not.

Objection 0.2.2 — Like View Cookies, the automatic updater doesn’t seem to work. Version 0.3.3 supports Firefox 3.

Update: Minimize to Tray 0.0.1.2006102615+ (windows) — Hacked version 0.0.1.2006102615.99 also works with Thunderbird 2.*.

Autohide 1.2 — Most of the features are incorporated into the base build of Firefox 3 so I won’t be using it.

^ Top