Extreme-Ultraviolet Emission Lines of S XII in Solar Active Region and Flare Spectra