Questions tagged [special-characters]

Special characters (as they apply to programming) are language-specific reserved characters or symbols used to accomplish a specific task (e.g. wildcard characters, data type indicators, escape characters, etc).

Every character is special in its own way. When talking about "special characters" in a question, be specific. Do you mean ASCII symbols, Japanese kana, or Egyptian hieroglyphs?

For example, when working with Unicode, characters from exotic scripts aren't more "special", technically, than characters from the ASCII range. If you mean characters that you can't enter directly with an US PC keyboard, you should probably use the term "non-ASCII characters" and avoid this tag.

5011 questions
48
votes
6 answers

Insert special character using :before pseudo class in css

I was toying around with the :before pseudo class in css, trying to insert a special character but the result is not what I was hoping for. Using: .read_more:before { content: "»"; margin-right: 6px; } I get the character I want, but with…
jeroen
  • 91,079
  • 21
  • 114
  • 132
48
votes
9 answers

How to escape special characters like ' in sqlite in android

I have a function which is executing a query on a table in SQLite database. I declare a constant: public static final String CANADA_HISTORY = "Canada's History";. This is stored in a String variable let's say difficulty, I have one query: Cursor c…
Rahul Patel
  • 3,823
  • 5
  • 30
  • 46
46
votes
2 answers

Is it necessary to use — and – in XHTML or HTML5?

It seems that it is best to use the & escape, instead of simply typing the ampersand (&). However, should we be using X/HTML character entity references for dashes and other common typographical characters when writing blog posts on CMSs like…
46
votes
9 answers

With iTerm2 on Mac, how to delete forward a word from cursor on command-line?

With iTerm2 1.0.0 on Mac OS X 10.6.8, I'd like to delete from cursor to the next end of word, i.e. deleting one word forward. I tried Alt+d but this types the delta operator symbol ∂ and doesn't delete. How to suppress the typing but let it…
qazwsx
  • 25,536
  • 30
  • 72
  • 106
45
votes
7 answers

How to insert special HTML-symbols with HAML

When I'm saying: %p= item.price + " dollars" I'm getting 50  ;dollars instead of having non-breakable space symbol. How to insert this and another special symbols using HAML ?
AntonAL
  • 16,692
  • 21
  • 80
  • 114
45
votes
6 answers

c# replace \" characters

I am sent an XML string that I'm trying to parse via an XmlReader and I'm trying to strip out the \" characters. I've tried .Replace(@"\", "") .Replace("\\''", "''") .Replace("\\''", "\"") plus several other ways. Any ideas?
Tim Shults
  • 517
  • 1
  • 5
  • 10
45
votes
3 answers

How to replace decoded Non-breakable space (nbsp)

Assuming I have a sting which is "a s d d" and htmlentities turns it into "a s d d". How to replace (using preg_replace) it without encoding it to entities? I tried preg_replace('/[\xa0]/', '', $string);, but it's not working. I'm…
Grzegorz
  • 3,538
  • 4
  • 29
  • 47
44
votes
6 answers

Post UTF-8 encoded data to server loses certain characters

I am working on project which includes communication of the server (JavaEE app) and client (Android app). XML is sent as one of POST parameters of the HTTP request (named "xml"). There are also few other POST parameters which I pass to server, but…
dstefanox
  • 2,222
  • 3
  • 19
  • 21
44
votes
4 answers

How to escape colon (:) in $PATH on UNIX?

I need to parse the $PATH environment variable in my application. So I was wondering what escape characters would be valid in $PATH. I created a test directory called /bin:d and created a test script called funny inside it. It runs if I call it with…
44
votes
7 answers

What's the ASCII character code for '—'?

I am working on decoding text. I am trying to find the character code for the — character, not to be mistaken for -, in ASCII. I have tried unsuccessfully. Does anybody know how to convert it?
Adam Sh
  • 8,137
  • 22
  • 60
  • 75
43
votes
3 answers

Do the 'at' symbol (@) and dollar sign ($) have a special meaning in C or C++?

Recently, one of my friends encountered this question in an interview. The interviewer asked him if the special characters like $, @, |, ^, ~ have any usage in C or C++ and where. I know that |, ^ and ~ are used as bitwise OR, XOR and complement…
Forever Learner
  • 1,465
  • 4
  • 15
  • 30
39
votes
7 answers

UTF-8 encoded html pages show � (questions marks) instead of characters

I have the standard XAMPP installation on win7 (x64). Having had my share of encoding troubles in a past project where mysql encoding did not match with the php enconding which in turn sometimes output html in other encodings, I decided to…
leugim
  • 564
  • 1
  • 5
  • 14
38
votes
4 answers

jQuery: Check if special characters exists in string

I know this question is asked more often here on Stack, but I can't seem to get a straight answer out of the questions already posted. I need to check if all special characters (except -) are in a string, if so, then give the user an alert. What I…
Guido Visser
  • 2,209
  • 5
  • 28
  • 41
37
votes
8 answers

Change foreign characters to their roman equivalent

I am using php and I was wondering if there was a predefined way to convert foreign characters to their non-foreign alternatives. Characters such as ê, ë, é all resulting to 'e'. I'm looking for a function that would take a string and return it…
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
37
votes
1 answer

What does # mean in LISP

For example, #'functionname, is it necessary?
Thomson
  • 20,586
  • 28
  • 90
  • 134