Taiwan has been hit by the strongest earthquake in a quarter of a century.