Use full ascii table to file name in linux

0

In the Windows operating system I can use unusual characters in the file name by typing the decimal code of the character in the number pad. This way I can access all of the characters in the character set, even if the character doesn't have a corresponding keyboard key.

Is there a way to do something similar using Linux?

Frederico Schardong

Posted 2011-10-01T01:35:32.990

Reputation: 117

1

Perhaps you're referring to unicode input ?. Here's how you do it on most desktop systems: http://en.wikipedia.org/wiki/Unicode_input

– nos – 2011-10-01T01:38:42.340

Answers

0

Probably not the ideal solution, but you can simply use printf to embed the characters. For example, to create a file named 'A' (octal 101), you can do:

$ touch "$(printf '\101')"

William Pursell

Posted 2011-10-01T01:35:32.990

Reputation: 1 387

Or, touch $'\101' in bash. – user1686 – 2011-10-01T10:21:47.850

1

ASCII only covers a certain set of characters, starting at ASCII 0 to ASCII 127. Those numbers above 127 are in heavy conflict, depending on which non-ASCII extension was used.

The general "best" solution to go with for maximum portability these days is one of the Unicode encodings. There are a number of them, but UTF-8 is very popular. When I say there are a number of Unicode encodings, realize that unlike different character sets, all Unicode encodings encode the same characters, they just do it with a different number of bits. UTF-8 attempts to save a lot of disk space / memory if your stuff is mostly ASCII.

In Linux, Gnome offers a "character picker" application, called gnome-character-map, which will allow you to find all of the glyphs in a font for all of the Unicode characters. Note that while it is possible to write a Unicode character, depending on the font you use, there might not be a glyph (or symbol) embedded in the font to display that Unicode character. When you don't have something to display a particular character, sometimes a square will be drawn in the unavailable glyph's place.

I typically cut and paste characters from the character map when I need to do something special; however, there is a sequence to directly type the character in (similar to windows). Do a Shift-Control and then type in the hexadecimal character value (which you can look up in the character map, if necessary).

Edwin Buck

Posted 2011-10-01T01:35:32.990

Reputation: 231

Do a Shift-Control and then type in the hexadecimal character value where? I've tried VI, nautilus, gedit but nothing.. – None – 2011-10-01T03:41:27.677