Questions tagged [non-breaking-characters]
31 questions
6
votes
3 answers
JavaScript: replace non breaking space and special space characters with ordinary space
I was trying to debug a problem of searching inside a string and it came down to the following interesting piece of code.
Both "item " and "item " seem equal but they are not!
var result = ("item " === "item…

Irshad P I
- 2,394
- 2
- 14
- 23
4
votes
1 answer
How can I make testing-library's getByText() match a string including a non-breaking space ( )?
I'm trying to match a phone number string that includes a non-breaking space:
assert
.dom(
screen.getByText(
[my text with a non-breaking space]
) as HTMLElement
)
.exists();
However, it is returning this error:
Unable to…

Jim Hays
- 95
- 1
- 8
3
votes
1 answer
How to remove non-breaking spaces from a column in Postgres
Trying to remove a non-breaking space from a field without any success. I've tried
execute <<-SQL
UPDATE customers
SET name = TRIM (name)
SQL
but this removes only spaces. It's similar question as this but I need it for Postgres (Postgres…

Kote
- 683
- 1
- 9
- 27
2
votes
0 answers
Non-breaking spaces for use in HTML and HTML-formatted email
I am working with a website that has its origins back in 2001. In those days tables were heavily used for layouts, and Internet Explorer was a dominant browser. Back then there was a requirement to use non-breaking spaces in empty table cells…

Jeffrey Simon
- 918
- 3
- 11
- 25
2
votes
0 answers
Powershell Get-Content file not found after Get-ChildItem
I am currently trying to read the metadata from an index server export with PowerShell to be able to tag a SharePoint document library with this information.
First I search all XML files in the current directory:
$XMLPaths = Get-ChildItem -Recurse…

heim0r
- 21
- 1
2
votes
3 answers
2
votes
2 answers
PHP: How to get rid of strange characters like "\u00a0"?
I got a messy bunch of JSON data to import into my database (for further purposes). When i checked them out (opened in a Text Editor), they contain so many weird (gibberish) characters like:
\u00a0
For example, data.json:
[{"title":"hello…

夏期劇場
- 17,821
- 44
- 135
- 217
1
vote
2 answers
Replacing space after number with hard space in p tag
I would like to replace a space after a number with hard-space " " only in p tags.
I wrote this code:
$pattern = "/
[0-9] <\/p>/"; return preg_replace($pattern, "$1 ", $text); But it does nothing, why? Can you please…

Josef Kuchař
- 51
- 1
- 4
1
vote
3 answers
how to compare numbers in cypress
I'm new to Cypress and I need to compare theese two numbers: 1045,92 and 1045,92
1 045,92 р.
I try like this
cy.xpath("").invoke('text').then((text1)…

Alex77
- 27
- 4
1
vote
1 answer
Replace spaces with non-breaking spaces according to a specific criterion
I want to clean up files that contain bad formatting, more precisely, replace "normal" spaces with non-breaking spaces according to a given criterion.
For example:
If in a sentence, I have:
"You need to walk 5 km."
I need to replace the space…

Satanas
- 161
- 1
- 11
1
vote
3 answers
remove non breaking space in power query
Just come across an interesting issue where PQ isn't transforming seemingly identical data in the same way.
As an example here I just wish to replace 24 mg/kg bw/day with Hello:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
…

Nick
- 789
- 5
- 22
1
vote
2 answers
Cannot get text as in GUI
I have some amounts which I need to display. The amounts needs to be hovered and then they would show.
For example an amount may be +123 456,33 but in the code it is showing as like +123NNSP456,33.
Now when I write my test, I am having to…

ZombiePie
- 299
- 1
- 4
- 14
1
vote
1 answer
How Can I Remove Non-Breaking Leading Whitespace in Matlab?
Say I have a string variable, " Fruit".
Usually, I use strtrim() to remove the leading whitespace. Therefore, " Fruit" becomes "Fruit".
However, if the leading whitespace is non-breaking, i.e. char(160), then strtrim, as well as its cousins -…

Andrew
- 23
- 1
- 4
1
vote
1 answer
Pandas read_html issue with  
I'm using pandas read_html to read an html file and I'm running into an issue with nonbreaking spaces. I have data in a column of resulting data frame that should contains a string like "ABCDEF G" (three spaces between F and G). Instead I'm…

ejyoung
- 81
- 1
- 8
1
vote
2 answers
Removing non-breaking space characters in R
I have dataframe with several columns and 50K plus observations. Let's name it df1. One of the variables is PLATES (denoted here as "y"), which contains plate numbers of buses in a city. I want to match this data frame with another(df2) where I also…

Ricardo
- 25
- 4