Questions tagged [soft-hyphen]

a soft hyphen or syllable hyphen, abbreviated SHY, is a code point reserved in some coded character sets for the purpose of breaking words across lines by inserting visible hyphens.

a soft hyphen or syllable hyphen, abbreviated SHY, is a code point reserved in some coded character sets for the purpose of breaking words across lines by inserting visible hyphens.

31 questions
179
votes
13 answers

Soft hyphen in HTML ( vs. ­)

How do you solve the problem with soft hyphens on your web pages? In a text there can be long words which you might want to line break with a hyphen. But you do not want the hyphen to show if the whole word is on the same line. According to comments…
Pontus
  • 2,769
  • 4
  • 20
  • 13
31
votes
5 answers

In HTML, is it possible to insert a word wrapping hint?

Imagine I have a long, multi-word line of text in a DIV: Hello there, dear customer. Please have a look at our offer. The DIV has a dynamic width. I want to word wrap the above text. Currently, the wrapping happens on a word boundary which…
Krystian Cybulski
  • 10,789
  • 12
  • 67
  • 98
11
votes
6 answers

HTML: Soft hyphen (­) without dash?

I have a little layout problem: on a clients website, we show contact information of people in a little box. The width of that box is constrained. As it happens, there are people with very long names (this is in Germany, after all...), and the email…
Benjamin Wohlwend
  • 30,958
  • 11
  • 90
  • 100
10
votes
1 answer

In iOS 15, Soft hyphen is not working properly when using unicode character in UILabel

In iOS 15 soft hyphens (\u{00AD}) are not considered when setting text on UILabel. for example: The following code does render the text with the soft hyphen correctly in iOS 13 & 14, but not in iOS 15. import UIKit class ViewController:…
Renato Stauffer
  • 738
  • 2
  • 14
  • 30
10
votes
4 answers

How to hide a soft hyphen (­) in HTML / CSS

I am trying to word-wrap an email address within a div, where otherwise it would overflow because it's too long for the div's width. I know this issue has been covered here before (e.g. this question), but read-on, because I cover all the possible…
hazymat
  • 404
  • 1
  • 6
  • 20
9
votes
2 answers

How to implement soft hyphen in Android w/ React Native Text

Aufmerksamkeits{'\u00AD'}defizit This leads iOS to Aufmerksamkeits- defizit But on Android to Aufmerksamkeitsd efizit So it seems that Android ignores the given soft hyphen. How can I make this work on Android as well?
7
votes
1 answer

Removing soft hyphens from a string

Let's say I have a string that is littered with soft hyphens (pretend that the hyphens in the text below are soft hyphens): T-h-i-s- -i-s- -a- -t-e-s-t-.- I want to remove the soft hyphens and only return the string of: This is a test. I'm trying…
BeraCim
  • 2,317
  • 8
  • 49
  • 78
5
votes
0 answers

TextView hyphenation below API 23

In API 23 TextView hyphenates text correctly: longwooord\u00AD1231232131 is correctly split from the \u00AD char resulting in longwooord- and 1231232131 on the next line. However for API 21 \u00AD is just ignored and word is split where it reaches…
Kaarel Purde
  • 409
  • 1
  • 5
  • 12
4
votes
2 answers

Find soft hyphens in HTML document

Let's look at following code: $('#el').html('ex­am­ple'); Now, how can I get back that element's text with soft hyphens entities? Both of these: $('#el').html(); $('#el').contents().get(0).nodeValue; gives me "example" as return value,…
jesper
  • 879
  • 8
  • 21
3
votes
1 answer

What is normal HTML line break behavior?

I am looking for a list of caracters and elements that may break HTML lines such as whitespaces but I can't find any page on the Internet with a definition of what is the normal HTML line break behavior. I have found those : divisable space,…
2
votes
1 answer

Cypress assert text while ignoring soft hyphens

I'm trying to E2E test a web application using cypress/cucumber. The page I'm testing has a H1 title I want to check the contents of. Normally I would use something like cy.get('H1').should('contain.text', 'some longpagetitle') However there is a…
2
votes
0 answers

Why does IndexOf Soft hyphen returns 0 as a string?

If you call IndexOf with the soft hyphen character as parameter, it will work as expected: "aaa".IndexOf(Convert.ToChar(173)) // return -1 "aaa\u00AD".IndexOf(Convert.ToChar(173)) // return 3 However, if you call the exact same code using the soft…
The_Black_Smurf
  • 5,178
  • 14
  • 52
  • 78
2
votes
2 answers

display soft hyphen character in vim in Mac OS X Terminal

vim is totally confused with soft hyphen characters (0xAD) in the Mac OS X Terminal. It is not displayed, although the "virtual column" number is right, the insertion is messed up. So if I have a line with a-b, where - is the soft hyphen, it shows…
Olivier Verdier
  • 46,998
  • 29
  • 98
  • 90
2
votes
2 answers

Using ­ in Java HTML aware Component

I have following problem: I display an HTML-Document with an JTextPane. In my HTML-Text there are ­ (shy at w3.org) to make a soft-hyphenation. My problem is, that no hyphenation appears. Is there some kind of flag, which I don't know, to use…
Christian Kuetbach
  • 15,850
  • 5
  • 43
  • 79
2
votes
3 answers

­ (soft hyphen) and Chrome and Safari

I have a website where I would prefer to use ­ ; (soft hyphen) to break words the way I want. Click here for screenshot from Chrome The problem computers run OS X (multiple versions) and the problem occurs in both Chrome and Safari (multiple…
nle
  • 57
  • 1
  • 9
1
2 3