Given "https://[fe80::1%en1]:8888/" curl incorrectly turns that into "https://[fe80::1]:88]:8888/" after removing the scope identifier and then tries to connect to port 88.
The bug also affects '%25' non-numeric scope names. Numeric scope names are handled by a different branch of the code and work properly.
Patch attached here. Could make it a GitHub pull request if preferred.
I've been able to repeat it.
Just pushed a slightly modified fix.
https://github.com/bagder/curl/commit/14c3601583bfe171a33971115220378d5076e3b8
Thanks for reporting.