Questions tagged [whitespace]

Whitespace, or white space, is often used to refer to any combination of spaces, tabs, and new lines which create blank space between text, either horizontally or vertically.

Whitespace, or white space, is often used to refer to any combination of spaces, tabs, and new lines which create blank (or white, originally referring to the background color behind it) space between text, either horizontally or vertically. White space is not represented by a visual character or symbol, but in most cases does occupy space on the page.

Whitespace Characters

The following characters are all defined as being whitespace.

  • U+0009 - Horizontal Tab
  • U+000A - Line Feed
  • U+000B - Vertical Tab
  • U+000C - Form Feed
  • U+000D - Carriage Return
  • U+0020 - Space
  • U+0085 - Next Line
  • U+00A0 - Non-Breaking Space
  • U+1680 - Ogham Space Mark
  • U+180E - Mongolian Vowel Separator
  • U+2000 - EN Quad
  • U+2001 - EM Quad
  • U+2002 - EN Space
  • U+2003 - EM Space
  • U+2004 - Three-per-EM Space
  • U+2005 - Four-per-EM Space
  • U+2006 - Six-per-EM Space
  • U+2007 - Figure Space
  • U+2008 - Punctuation Space
  • U+2009 - Thin Space
  • U+200A - Hair Space
  • U+2028 - Line Separator
  • U+2029 - Paragraph Separator
  • U+202F - Narrow Non-Breaking Space
  • U+205F - Medium Mathematical Space
  • U+3000 - Ideographic Space
4336 questions
2
votes
2 answers

Why doesn't c++ compiler output the text on the next line while it does when putting spaces in between?

This may seem to be a duplicate question but actually its quite different because other questions don't answer my question entirely.My question is,why doesn't c++ compiler output the text on the next line but it does when i enter infinite spaces in…
0decimal0
  • 3,884
  • 2
  • 24
  • 39
2
votes
3 answers

Subversion whitespace-removal commit hook

Jeff Atwood wrote about whitespace and suggested creating commit hook which removes trailing whitespace at the ends of lines and files. I've searched, but I haven't found a clear example of using a pre-commit hook to modify files like this. Do you…
a paid nerd
  • 30,702
  • 30
  • 134
  • 179
2
votes
2 answers

View whitespace in VS2008

After Jeph most recent post: http://www.codinghorror.com/blog/archives/001310.html, I thought to myself it would be fun to see if any of my code has those trailing whitespaces. So I open Visual Studio, go to settings and I can't find an option to…
KdgDev
  • 14,299
  • 46
  • 120
  • 156
2
votes
1 answer

%20 in filename, browser sees whitespaces. How to avoid that?

I have imported images to my own server. One of the many filenames has %20 in them, e.g. 50128%202789%20001V%20500.jpg. However the browser sees it as 50128 2789 001V 500.jpg, so it won't display the image. What solution can I use, to display the…
2
votes
2 answers

Whitespaces around PHP tags causing ajax calls to have extra whitespaces

I have a small problem that has been bugging me for quite some time now, but I can't seem to solve it myself. I googled it and didn't really find anything useful. I thought, maybe someone else came across this problem, or will come across it in the…
user2285451
  • 107
  • 1
  • 2
  • 11
2
votes
2 answers

Ruby: Remove invisible characters after converting string to UTF-8

I am working with text coming from this website with windows-1252 charset. Converting the text to UTF-8 was done using force_encoding, but the text still contains whitespace that I can't get rid of. The whitespace cannot be removed using…
Bart Jacobs
  • 9,022
  • 7
  • 47
  • 88
2
votes
1 answer

What is this strange whitespace in Sublime Text?

In Sublime Text 2, some of my whitespace behaves strangely. For example, I select the contents of a script (as shown in the screenshot below), and do Shift + Tab (to reduce indentation) it only works on the lines with normal spacing, resulting in my…
Zach Lysobey
  • 14,959
  • 20
  • 95
  • 149
2
votes
1 answer

Whitespace in pyplot legend entry?

I want to add some spacing between the end of the legend entry and the legend border. I've tried using the arguments for pyplot.legend but I haven't found a combination that works. Here's a minimal working example: import matplotlib.pyplot as…
Blink
  • 1,444
  • 5
  • 17
  • 25
2
votes
2 answers

C++ output duplicating lines when there is a '\n'

I'm having some trouble with this member function of a class. Basically, it's meant to translate words to a different language while maintaining the same punctuation and spaces. lineToTranslate is an input argument which is an array of words, spaces…
Michael
  • 199
  • 1
  • 9
2
votes
2 answers

How many non-printing characters are in common use?

When writing interpreters for PDF, HTML and other documents we need to deal with a variety of white-space characters and additional non-printing characters. The ANSI ones are well defined, but how many others are likely to be found in practice? A…
peter.murray.rust
  • 37,407
  • 44
  • 153
  • 217
2
votes
4 answers

split() a String to a Stringarray, and not getting a blank at [0]

I'm trying to split() a String with no whitespaces, but getting a blank at [0]. String s = "..1..3.."; String[] result2 = s.split(""); System.out.println(result2[0]); // giving me a blank space I'v realized that "" might not be the right one, but…
zill69
  • 57
  • 1
  • 7
2
votes
1 answer

Fortran: odd space-padding string behavior when opening files

I have a Fortran program which reads data from a bunch of input files. The first file contains, among other things, the names of three other files that I will read from, specified in the input file (which I redirect to stdin at execution of the…
Tomas Aschan
  • 58,548
  • 56
  • 243
  • 402
2
votes
4 answers

Escaping whitespace within nested shell/perl scripts

I'm trying to run a perl script from within a bash script (I'll change this design later on, but for now, bear with me). The bash script receives the argument that it will run. The argument to the script is as follows: test.sh "myscript.pl -g \"Some…
EDJ
  • 475
  • 1
  • 7
  • 16
2
votes
2 answers

Wordpress extra spaces breaks layout

I am creating and developing a custom Wordpress theme and I am struggling with one issue, which is making me crazy and I can't find any fix and can't figure out, what I am doing wrong... There is some extra spaces added in output which breaks the…
unqvsn
  • 33
  • 4
2
votes
1 answer

How to ignore whitespaces and new line feeds while parsing a XML file

how can I ignore whitespaces while parsing a XML file. It always calls the characters(...) method again, while after the end element a '\n' or '\r' is following, so it calls this method twice, instead of only once.
marc3l
  • 2,525
  • 7
  • 34
  • 62