Welcome to ZDriver!
Z32 to Z31 is a stretch. I doubt it would work. You can go to XenonZ32.com Reference
and XenonZ31 Reference
, download the service manuals and fiches to compare the two cables.
Also check out Courtesy at 443 Parking Brake Control :: Brake :: Genuine Nissan Parts :: 300ZX Parts (Z31) 1984-1989 :: Nissan Parts, NISMO and Nissan Accessories - Courtesyparts.com
I think Z31 parking brake cables are available here in the US. I know because I bought one about 8 mos ago and installed it. Works perfectly. I think it was aftermarket, not Courtesy - and it was pricey, less than $200 - but it did the job. There is a market here for them because northeastern states salt the roads in winter and the salt corrodes the cables over the years - and everything else underside.
Someone here can ship you one if you want to pay for that. Message me if you want me to check around.