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.