Are you trying to create these characters in a certain software like MS Office or at a command prompt or in a browser session or just what exactly? Some software apps will apparently generate the longer en-dash when you type two consecutive hyphens (I got this behavior in Libre Office for example). [https://www.techrepublic.com/blog/microsoft-office/four-ways-to-insert-an-em-dash-in-a-word-document/|How to type the so called em-dash in MS word.]