Questions tagged [zero-width-space]

a control character used to indicate boundaries between words

A zero-width space is a control character (non-printing character) used to indicate boundaries between words.

In Unicode, this character is encoded as U+200B.

In HTML, this character is encoded as ​.

22 questions
10
votes
0 answers

Zero-width space with special characters

Interesting problem here, wondering if anyone has come across it. I am building an Android app that has some special characters as text (mainly Japanese characters) and our designers want some soft returns strategically placed, incase the text needs…
erik
  • 4,946
  • 13
  • 70
  • 120
7
votes
2 answers

Zero-width space vs zero-width non-joiner

What is the difference between zero-width space (U+200B) and zero-width non-joiner (U+200C) from practical point of view? I have already read Wikipedia articles, but I can't understand if these characters are interchangeable or not. I think they are…
john c. j.
  • 725
  • 5
  • 28
  • 81
6
votes
2 answers

General method to trim non-printable characters in Clojure

I encountered a bug where I couldn't match two seemingly 'identical' strings together. For example, the following two strings fail to match: "sample" and "​sample". To replicate the issue, one can run the following in Clojure. (= "sample" "​sample")…
6
votes
1 answer

mysterious leading "empty" character at beginning of a string which came from CSV file

During the process of reading a CSV file into an Array I noticed the very first array element, which is a string, contains a leading "" . For example: str = contacts[0][0] p str gives me... "SalesRepName" Then by sheer chance I happened to try:…
holaymolay
  • 520
  • 4
  • 17
3
votes
1 answer

How can I get sensible results from len(), str.format() and a zero-width space?

I'm trying to format text in a kind of table and write the result to a file, but I have problems with the alignment, because my source sometimes contains the Unicode character 'ZERO WIDTH SPACE' or \u200b in python. Consider the following code…
rhall
  • 75
  • 6
2
votes
0 answers

Can not remove \u200B zero space in text with javascript

I am not able to remove zero width character from a string. It is no problem to remove any other character, only the '\u200B' seems to resist my tries. I am getting strings from my API that contain zero spaces (\u200B) that are used to tell the…
Sinan Theuvsen
  • 193
  • 1
  • 3
  • 14
2
votes
0 answers

VS2013 can't replace content with $1, why?

I am using VS2013, and i want replace some text. Because the file has many alike word, so i have to use regex look ahead, look behind so search and replace. text.txt: abc adc regex: (?<=a)([a-z])(?=c) and replace with xxx$1xxx But failed to…
Lea.3
  • 21
  • 2
2
votes
0 answers

How delete zero-width space in String javascript and my comparacion return true

I have a javascript string containing 3 zero-width space. https://jsfiddle.net/cmedina/pe1jup8a/ 4 returns when var.length use. My question is how can I delete the zero-width space to be able to compare "." === "." and return true. in JavaScript…
CMedina
  • 4,034
  • 3
  • 24
  • 39
2
votes
2 answers

PHP fix zero-width-space inside string variable

I have zipcodes being outputted, coming from user inputted values. Looks like it is outputting zero-width-space \u200b sometimes at the beginning of the strings. What is the best way to replace these from within php before echoing the variable?
Solomon Closson
  • 6,111
  • 14
  • 73
  • 115
1
vote
0 answers

Winforms Label wrap hint for long string without spaces

A label displays a long string (letters and slashes, no spaces) in multiple lines. I want to control where possible line wraps should happen. Specifically after slashes wraps are desirable, whereas in other places not. I tried appending a zero-width…
cad
  • 347
  • 5
  • 20
1
vote
1 answer

How to insert a zero-width line between two characters in a contenteditable HTML element

I am using React to create a web app to help people to spell words correctly in a foreign language. I want to provide feedback on where a word is misspelled. In particular, when the user has missed out a letter, I want show a mark in red to indicate…
James Newton
  • 6,623
  • 8
  • 49
  • 113
1
vote
1 answer

Python, selenium - how to refresh page until item found?

I am trying to refresg page until item appears but my code doesn't work (I took pattern on that: python selenium keep refreshing until item found (Chromedriver)). Here is the code: while True: try: for h1 in…
Nudam
  • 79
  • 1
  • 1
  • 11
1
vote
0 answers

How to delete all  via Javascript

I've made an extension for google Chrome, it's a Bot for the Supreme Shop. The Bot worked nearly one year. But now Supreme changed their Product names. Example: before "Supreme®/Hanes® Tagless Tees (3 Pack)" and now they put randomly some …
0
votes
1 answer

Why does split works without a delimiter?

I encountered this formula here, Why the split works without a delimiter? =SPLIT(A2&"​"&B2, "​") But not showing this error.
Osm
  • 2,699
  • 2
  • 4
  • 26
0
votes
1 answer

How to add Zero Width Character

After reviewing this article from this Flutter issue (regarding to identify when back key is pressed to work with a pin alike widget) I've been trying to add the \u200b special character as suggested in the article, but it is always taking it as a…
Carlos Daniel
  • 2,459
  • 25
  • 30
1
2