EzDevInfo.com

special-characters interview questions

Top special-characters frequently asked interview questions

How to force Windows to rename a file with a special character?

I have a song that Windows can't play because there is a question mark in the name of the file.

"Where Have All the Cowboys Gone?.ogg" // as an example

So I try to rename it and Windows complains whether I try it in Explorer or from command prompt.

Error I get when trying to copy, rename, or move is:

The Filename, directory name, or volume label syntax is incorrect

Is there a Windows way to force a rename in this case?

Update

I'll keep an eye on this question, but after 13 answers and many attempts (aside form 3rd party solutions) it seems that Windows can't do this (or at least my windows can't, no short names). So I'm accepting the answer which was my original solution anyway of using Linux. It would be nice to see Windows handle this somehow, so don't stop just because I've accepted this answer, the question still stands!


Source: (StackOverflow)

Why are special characters such as "carriage return" represented as "^M"?

Why is ^M used to represent a carriage return in VIM and other contexts?

My guess is that M is the 13th letter of the Latin alphabet and a carriage return is \x0D or decimal 13. Is this the reason? Is this representation documented anywhere?

I notice that Tab is represented by ^I, which is the ninth letter of the Latin alphabet. Conversely, Tab is \x09 or decimal 9, which supports my theory stated above. However, where might this be documented as fact?


Source: (StackOverflow)

Advertisements

Why do English characters require fewer bytes to represent than other alphabets?

When I put 'a' in a text file, it makes it 2 bytes but when I put, let's say 'ա', which is a letter from Armenian alphabet, it makes it 3 bytes.

What is the difference between alphabets for a computer?
Why does English take less space?


Source: (StackOverflow)

Alt+Numpad key codes on modern Windows laptops without numpad [duplicate]

This question already has an answer here:

I am using the Windows Alt+Numpad method a lot on my desktop PC to enter special characters like n-dash (Alt+0150), hard space (Alt+0160), typographic quotes, bullets, etc. This method needs a numpad and a numlock key to switch the numpad to number output.

For roughly a decade I could also use this Alt+Numpad method on several old 15 inch Win-XP laptops (without a numpad) by holding down Fn+Alt and typing on a "simulated" numpad on the following keys:

789  -->  789
UIO  -->  456
JKL  -->  123
M    -->  0

On latest generation laptops I cannot find this method any more (tested on Dell XPS15z & Samsung Series 9). I searched the web for hours but all I could find are tips that seem outdated (using Fn+ScrollLock instead of Fn+Alt, etc - many modern 15 inch laptops have neither NumLock nor ScrollLock).

The Microsoft standard response (example) is to use the Character Map to pick, copy and paste special characters, but this is way to inefficient for frequent usage.

Is there any method to quickly enter special characters on modern Win laptops? Maybe some additional software? I cannot believe that there is no efficient way to do this on modern machines that cost +1500 EUR.


Source: (StackOverflow)

How to display new line character (^J) in emacs replace query

Say I want to replace all the new lines in my emacs buffer with the character k (wait for the -1, read the rest! :) ). I know I can type M-x replace-string RET C-q C-j RET k. It works fine.

My problem is that the new line character, i.e. ^J is not displayed in the replace query, I just get a new line in the query string. Instead if I try to type C-q C-<another_char> I get ^<another_char>.

As I said, it works fine, but it is annoying, because it is not compact and not easily readable. Is this the default behavior in emacs? Does anybody know how to change it?


Source: (StackOverflow)

Can't paste symbol from Character viewer in Mac to Photoshop

This is extremely annoying:

I want to paste in a special symbol in Photoshop using the Character Viewer in Mac. I understand that there are some fonts that do not support these symbols, but when I paste this symbol in Photoshop, it appears as an unknown symbol (similar to this: ⊠ ), and I can't even change the font (to anything), it skips back to Myriad Pro.

I found a stupid solution to this: using the arrows to change fonts - this seems to work, but still Photoshop doesn't show all fonts that are available in Character Viewer under Font Variation

Have you experienced this? I can't remember if it was the same with Windows, but I know there were some bugs too.


Source: (StackOverflow)

Text files on linux have "<97>" characters

When viewing a particular text file in vim or less on Linux or OS X, all the en dashes show up as highlighted "<97>" characters.

What control-sequence do I need to type in order to substitute the hyphens back? For example, the following doesn't work in vim:

% s/<97>/--/g 

Typing bracket nine seven bracket is not the same as typing the actual special character.


Source: (StackOverflow)

Why is so hard to use the dash character?

When typing texts on Word, Notepad or even in Google Docs. I want to use the dash symbol. Note that symbol is used in dialogs.

All keyboards simply doesn't have the dash symbol (Alt+0151), so most people use the hyphen character (the minus signal on numeric keypad).

Note the difference:

Hyphen symbol: -
Dash symbol: —

When writing books or another text using dialogs is specially painful the absence of dashes... IMHO dashes are not special characters, but (very) common characters!

Some writer here lived that situation? How it's possible that none noted that absence/problem? How do you solved that problem?


Source: (StackOverflow)

How to configure keyboard shortcuts for special characters on OS X?

How to configure keyboard shortcuts for special character on OS X? For example, one would set ALT+C to ©.


Source: (StackOverflow)

Typing strange letters¿ w/o numpad?

How do i type ♣ (alt+5) and ♥ (alt+259) and other characters like it on a keyboard w/o a numberpad? using the numbers 1-9-0 doesnt activate those characters. Note i want to TYPE and not use that windows program to select/copy/paste


Source: (StackOverflow)

Cannot type any special character or umlaut in terminal

Environment:
I am using Ubuntu 11.10 with wmii 3.9 as GUI and uxterm as terminal with bash as shell. The hardware is a Lenovo ThinkPad W500 with a Swissgerman keyboard layout (thus I need umlauts). I am using ibus for Japansese input.

Symthoms:
When I type keys/chars like ~,^ in terminal nothing happens. If I press ö '(arg: 6)' appears, with ä nothing happens, with ü sometimes a command from the history appears.
It is the same behaviour in all terminals I tested so far (gnome-terminal, xfce4-terminal, xterm). It works as desired in other X applications like chromium-browser, skype or texteditors.

Additional information:

> locale
LANG=de_CH.UTF-8
LANGUAGE=en_US:en
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="de_CH.UTF-8"
LC_TIME="de_CH.UTF-8"
LC_COLLATE=en_US.UTF-8
LC_MONETARY="de_CH.UTF-8"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="de_CH.UTF-8"
LC_NAME="de_CH.UTF-8"
LC_ADDRESS="de_CH.UTF-8"
LC_TELEPHONE="de_CH.UTF-8"
LC_MEASUREMENT="de_CH.UTF-8"
LC_IDENTIFICATION="de_CH.UTF-8"
LC_ALL=

> setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+ch+inet(evdev)+terminate(ctrl_alt_bksp)"    };
        xkb_geometry  { include "pc(pc105)"     };
};

Source: (StackOverflow)

Service Pack 1Ð? What does Ð stand for?

While looking at some crash reports, I saw that one of the users has "Windows 7 Service Pack 1Ð". I thought that maybe it's a buffer overflow bug, but after googling for "Service Pack 1Ð", I saw that some other users have this, although not too many.

What does this Ð symbol mean? Is it specific to some locale?


Source: (StackOverflow)

Linux 'compose' key sequence extensions

Compose key is a great way way to write all these ©–®—… stuff. It's really MUCH more handy than the windows "alt+0169" method.

Is there a way to define additional sequences? E.g. I'd like to have "Compose+-->" result in "→"


Source: (StackOverflow)

Why can't you use special characters in a filename, like "?" or ";"?

When I try to save a file, if I use special characters in the name (such as a colon, question mark, or exclamation point) in Windows I get a message saying that the file name is invalid.

Why is that?


Source: (StackOverflow)

Hidden characters inserted after pipe (|) followed by a space

Very often, on my Mac, when I use the pipe (|) character followed by a space character, an invincible character will be inserted in between.

This is especially annoying when using the terminal, as it makes commands invalid.

If I type the following in iterm2, I often get the following:

ls | cat
zsh: command not found:  cat

If I hit the up-arrow-key to get my previous command, and then remove and reinsert the space between | and cat, the command will work.

When I copy paste the working and non working commands into a file, like this:

non-working: ls | cat
working: ls | cat

and open it in Hex Fiend it shows the following:

non-working: ls | cat
working: ls | cat

I've also experienced the same kind of issue in SublimeText2 using the square brackets ([]) followed by a space. So I don't believe its an issue with iTerm2.


Source: (StackOverflow)