March 2009 Archive

XMLHttp Character Encoding

March 23rd, 2009

I’ve been writing some new Intranet pages at work that include a searchable phone book that uses the XMLHttp object to return data in the background.

Many of the names in the database include Scandinavian Characters like å, ø and æ for example. IE always returned the correct results but if I searched for the Scandinavian characters using Firefox the search would return no results. It was clear that the SQL string being built in the ASP script was somehow mangling the characters so the query returned no data.

I checked the charcodes using JavaScript (using CharCode()) before the GET request was sent and IE and Firefox gave the same result. But then if I returned what the ASP script saw (using the asc function) it was clear that IE and Firefox disagreed at this point.

I assumed this was because the XMLHttp object in Firefox was using the wrong encoding so I added the following lines to force UTF-8 encoding (as used by the MS Access database phone book).

xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-Type", "text/html;charset=uft-8")

Unfortunately this did nothing, but after a lot of testing and head scratching I finally discovered that my ASP script was saved in ANSI format. As soon as I converted the script to UTF-8 and saved it everything worked perfectly in Firefox.

CSS font-size in IE Tables

March 17th, 2009

I’ve had this problem in many pages where the CSS font-size is not in inherited in IE tables. It turns out the fix is very easy, just add this one declaration to the table style rule.

font-size: 1em;

I’d like to thank the site below for the solution

Reference: http://shapeshed.com/journal/css_font_size_not_inherited_in_ie_tables/

Linksys WRT610N Experiences

March 17th, 2009

I ordered my new router last week and set it up over the weekend, it’s a Linksys WRT610N, shown here.

Linksys WRT610N

First thing is that it looks pretty good for a router, although it takes up more desk space due to the flat design. To avoid this you can attach it to a wall as there are screw holes in the base.

Set up was very easy even though there are lots of settings that are new to me, especially since it has 2 radios it actually has 2 SSIDs each with their own security settings. I didn’t use the included CD as it’s not very difficult to do it without.

I only have one laptop with a wireless adapter (Intel 5300 AGN) so I set the router to only use wireless N and set my laptop up to connect to the 5GHz N radio thereby hopefully reducing the interference with the 34 other networks I can see from my flat, most of which are on the 2.4GHz frequency.

Initial connection was fine but it didn’t take long to realise the connection speed was very bad, plus it would loose the connection on a regular basis. By very bad I mean down to 8 Kb/s! I then updated the firmware on the router as it was not the latest from then Linksys site.

This seemed to help a little but not totally, sometimes times I would get 50Mb/s plus then nothing. Finally I replaced the Windows Zero Configuration with the Intel PROset Wireless Software (I did try to get the software as recommended from the HP support site but the download was 89MB compared to 24 MB from Intel and had an older version of the wireless card driver included for some reason).

This seems to have done the trick at least so far. The connection has not dropped since and the bandwidth seems consistently higher. At least using the Speedtest.net site I can confirm that I’m consistently saturating my internet connection at 50Mb/s.

On another note the Intel software is much more informative than the Windows software as it actually tells you which wireless specification each SSID is transmitting at.

I’ll carry out some more tests on my LAN soon to see what bandwidth I’m actually getting with the new router. One final bonus is that wired connections to my NAS are also considerably faster now that the router had Gigabit Ethernet support.

Following Microsoft vs Tom Tom

March 6th, 2009

I’ve been reading plenty about the Microsoft case against Tom Tom recently. Essentially Microsoft is suing Tom Tom over claims that their in car GPS systems infringe on some of Microsofts patents.

As a couple of sites have pointed out it seems that Tom Tom is being forced into a corner whereby they either pay up to Microsoft and in the process open themselves up to being sued for infringement of the GPL license or drop Linux and be forced to use Microsoft embedded systems in future.

Either way it’s a loose-loose situation for Tom Tom, even if standing up to Microsoft instead of paying up and signing their Non-disclosure agreement is the right thing to do.

It does seems that with Linux on netbooks, smartphones (and maybe netbooks) using Google Android and thePalm Pre Microsoft is feeling the pressure.

Of course many have pointed out that if Microsoft enforces patents on the FAT file system one of the consequences may be that device manufacturers will move over to a GPL licensed system like ext2 instead. Oh the irony!

Choosing a Wireless N Router

March 5th, 2009

I’m thinking about soon buying a Dual band Wireless N router, probably the Linksys WRT610N as I’ve read some very good reviews regarding it’s bandwidth especially at longer ranges.

The main reason is that my work laptop has the Intel(R) WiFi Link 5300 AGN wireless card so I’d like to be able to use the extra bandwidth, plus the router has Gigabit Ethernet so even wired transfers to my Synology NAS box will benefit (it has a Gigabit network card). The only thing missing is Jumbo Frame support but I can live without that.

I also considered the D-Link Wireless N Duo Media Router DIR-855 but it’s about 250 DKK more expensive than the Linksys.

Dansk Bredbånd Price Increases

March 5th, 2009

I’ve been very happy with my 50Mbit/s Internet connection from Dansk Bredbånd but noticed on their website this week that their prices are increasing, and not just a little bit!

The internet connection alone I’m on is increasing by 43% meaning that the whole package increases by 25% (I also get phone and tv from them).

To call this an increase is a gross understatement, probably one of the only reasons they can do this is that entire buildings have signed over to their packages, if it were singe customers involved this would be commercial suicide.

Even so, at a time when broadband prices are dropping at record speed and competition increasing, especially for Triple play solutions, this seems a cynical ploy to gouge customers in an effort to stem their losses.