A magnitude 5.9 quake hit the sea off the east coast of the island in Taiwan’s capital, Taipei. The Taiwan Meteorological Administration said buildings in the capital, Taipei, shook for a while, indicating that there were no immediate reports of damage.