According to my research, that is a mistaken idea that arose at the beginning of the Japanese occupation and has been passed on ever since. The Shanghai-Wusung railroad was 2 ft. 6 in. (762 mm) in width while Taiwan's was 3 ft. 6 in. (1067 mm), and there was nearly ten years 'difference in age, which makes it practically impossible.
根據筆者考證，這是日據時代起就以訛傳訛所造成的錯誤記載，因為上海的淞滬鐵道是二呎六吋（七六二公釐）軌距，而台灣鐵路為三呎六吋（一○六七公釐），不太可能沿用；再加上年代差距近十年，所以更是不可能。