{{Short description|Computer character not a allowed in a given context}} {{Use New Zealand English|date=December 2023}}

In computer science, an '''illegal character''' is a character that is not allowed by a certain programming language, protocol, or program.<ref>{{Cite web |title=illegal character {{!}} Encyclopedia.com |url=https://www.encyclopedia.com/computing/dictionaries-thesauruses-pictures-and-press-releases/illegal-character |access-date=2023-09-07 |website=www.encyclopedia.com}}</ref> To avoid illegal characters, some languages may use an escape character which is a backslash followed by another character.<ref>{{Cite web |title=Python Escape Characters |url=https://www.w3schools.com/python/gloss_python_escape_characters.asp |access-date=2023-09-07 |website=www.w3schools.com |language=en-US}}</ref>

== Examples ==

=== Windows === In the Windows operating system, illegal characters in file and folder names include colons, brackets, question marks,<ref>{{Cite web |date=2023-08-12 |title=What Are Illegal Characters? (with pictures) |url=http://www.easytechjunkie.com/what-are-illegal-characters.htm |access-date=2023-09-07 |website=Easy Tech Junkie |language=en-US}}</ref> and null characters.<ref name=":0">{{Cite web |last=alvinashcraft |date=2022-12-15 |title=Naming Files, Paths, and Namespaces - Win32 apps |url=https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file |access-date=2023-09-07 |website=learn.microsoft.com |language=en-us}}</ref> {| class="wikitable" |+Illegal characters in Windows file names<ref name=":0" /> !Character !Name |- |< |less than |- |> |greater than |- |: |colon |- |" |speech marks |- |/ |forward slash |- |\ |backslash |- |<nowiki>|</nowiki> |pipe |- |? |question mark |- |* |asterisk |}

==References== {{reflist}}

Category:Character encoding