Wikipedia talk:Non-breaking hyphen

Code for non-breaking hyphen
I had to add a "#" following the "&" to make this code work. But the result does not look like a keyed hyphen - it's too short, and sits too high. This is what it looks like: "&#8209;", and here's a hyphen: "-". And next to each other: ‑ -. Does anyone know the correct code for a true non-breaking hyphen? Milkunderwood (talk) 07:22, 30 June 2014 (UTC)
 * This is a "true" non-breaking hyphen. The fact that it may look different is entirely dependent on what font is being used; if your default font does not contain a certain character, it will use a font that does.  08:45, 30 June 2014 (UTC)
 * Thanks for the clarification. Also, this discussion, copied from the Help desk:


 * "Hm... Hunting around online, 8209 is the HTML for what's considered to be a non-breaking "hyphen". I might do better filling the line with FFs and forcing the part before the hyphen down to the next line - but then you run into display problems where the break occurs in different places. So I guess 8209 is the only (albeit bad) solution. I tried " - " but this doesn't work here. Just out of curiosity, does the too-high and too-short 8209 character have a name, since it's a kludge rather than a real hyphen? Milkunderwood (talk) 09:14, 30 June 2014 (UTC)


 * "The whole area is a bit of a mess. The thing on your keyboard next to the zero key is actually a hyphen-minus (Unicode U+002D), and not (typographically) either a proper hyphen (U+2010) or a minus (U+2212).  Subject to the vagaries of the fonts you have installed, you should see that &$8208; (the "real" U+2010 hyphen) has the same appearance as &$8209; (U+2011) non-breaking hyphen.  Of course that doesn't help because the rest of the text is probably full of hyphen-minuses and the two characters will look odd close to each other.  AFAIK, there is no non-breaking hyphen-minus.  A partial solution is to use the nowrap template, something like this:  first-second, which should render as a pair of words, "first-second" that won't be subject to word-wrapping.  Rwessel (talk) 09:06, 30 June 2014 (UTC)
 * "The "nowrap" template does the trick for me - that completely solves my problem. Thanks very much. Milkunderwood (talk) 09:26, 30 June 2014 (UTC)"