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
136
votes
6 answers

grep for special characters in Unix

I have a log file (application.log) which might contain the following string of normal & special characters on multiple lines: *^%Q&$*&^@$&*!^@$*&^&^*&^& I want to search for the line number(s) which contains this special character string. grep…
Avinash Sonee
  • 1,701
  • 2
  • 15
  • 17
125
votes
5 answers

The "backspace" escape character '\b': unexpected behavior?

So I'm finally reading through K&R, and I learned something within the first few pages, that there is a backspace escape character, \b. So I go to test it out, and there is some very odd behavior: #include main () { printf("hello…
OregonTrail
  • 8,594
  • 7
  • 43
  • 58
124
votes
8 answers

How to use tick / checkmark symbol (✓) instead of bullets in unordered list?

I have a list where I want to add tick symbol before list text. Is there any CSS that can help me to apply this way? ✓ this is my text ✓ this is my text ✓ this is my text ✓ this is my text ✓ this is my text ✓ this is my text Note: I want this in…
Stack-overflow-hero
  • 1,361
  • 2
  • 9
  • 7
124
votes
5 answers

How should I escape commas and speech marks in CSV files so they work in Excel?

I'm generating a CSV file (delimited by commas rather than tabs). My users will most likely open the CSV file in Excel by double clicking it. My data may contain commas and speech marks, so I'm escaping those as follows. Reference, Title,…
centralscru
  • 6,580
  • 3
  • 32
  • 43
120
votes
9 answers

Identifying and removing null characters in UNIX

I have a text file containing unwanted null characters (ASCII NUL, \0). When I try to view it in vi I see ^@ symbols, interleaved in normal text. How can I: Identify which lines in the file contain null characters? I have tried grepping for \0 and…
dogbane
  • 266,786
  • 75
  • 396
  • 414
118
votes
3 answers

writing some characters like '<' in an xml file

since the beginning of my programmation, I used some special character like "<-", ""<<" im my string.xml in Eclipse while developping for Android. All worked fine for one year, but today, i just wanted to make some minor changes and began to edit my…
Waza_Be
  • 39,407
  • 49
  • 186
  • 260
117
votes
12 answers

HTML for the Pause symbol in audio and video control

I'm trying to find the Unicode symbol to make a button display the Unicode pause symbol. I was able to find that the Unicode play symbol is ► but I'm looking for the equivalent of the Unicode pause symbol.
user3081307
  • 1,211
  • 2
  • 10
  • 8
114
votes
1 answer

Insert the carriage return character in Vim

I'm editing a network protocol frame stored in a file in Unix (\n newlines). I need to insert the carriage return character (U+000D also known as \r or ^M). When I try to paste it from the clipboard ("+p) or type it using Ctrl+Shift+u-000d, the…
Andrey Vlasovskikh
  • 16,489
  • 7
  • 44
  • 62
112
votes
5 answers

Enter "&" symbol into a text Label in Windows Forms?

How would one enter special characters into a Label in C# (Windows Forms)? If you try to write a "&" into a label you'll get a sort of underscore instead.. So what's the C# equivalent of "&"? ("\&" obviously doesn't work).
Spectraljump
  • 4,189
  • 10
  • 40
  • 55
99
votes
3 answers

How to run MySQL command on bash?

The following code works on the command line mysql --user='myusername' --password='mypassword' --database='mydatabase' --execute='DROP DATABASE myusername; CREATE DATABASE mydatabase;' However, it doesn't work on bash file on…
johnatasjmo
  • 1,212
  • 1
  • 8
  • 13
98
votes
7 answers

Characters allowed in GET parameter

Which characters are allowed in GET parameters without encoding or escaping them? I mean something like this: http://www.example.org/page.php?name=XYZ What can you have there instead of XYZ? I think only the following characters: a-z…
caw
  • 30,999
  • 61
  • 181
  • 291
97
votes
19 answers

Check if a String contains a special character

How do you check if a String contains a special character like: [,],{,},{,),*,|,:,>,
blue
  • 971
  • 1
  • 7
  • 3
92
votes
27 answers

removing emojis from a string in Python

I found this code in Python for removing emojis but it is not working. Can you help with other codes or fix to this? I have observed all my emjois start with \xf but when I try to search for str.startswith("\xf") I get invalid character…
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
91
votes
5 answers

Java: What does ~ mean

In this Java source code I have this line: if ((modifiers & ~KeyEvent.SHIFT_MASK) != 0) .... What does the tilde ~ mean?
Martijn Courteaux
  • 67,591
  • 47
  • 198
  • 287
86
votes
5 answers

What are the allowed characters in a subdomain?

What characters are you allowed to use in a subdomain? Example: for someSub.example.com the someSub portion. I know you can use letters, numbers, and hyphens, but what about other characters? Can _ (underscore) be used?
somerandomdude
  • 871
  • 1
  • 6
  • 3