Why do I get "ń" instead of "ñ" when typing Alt code?

2

I'm learning Spanish and I just type the Alt code of ñ character. It should be Alt+0241 or Alt+241, but when I type that I get a ń.

I'm using a Windows 7, Hungarian version.

It is really annoying. Can someone help?

Cobol Tikal

Posted 2015-01-01T22:56:00.503

Reputation: 23

Welcome to Super User! Please edit your question to include what research you've done on your own in attempt to answer your question.

– I say Reinstate Monica – 2015-01-01T23:15:34.470

Answers

4

Alt-codes do not depend on the font, they depend on your system's locale.

Alt-codes that do not start with zero use your console codepage. Alt-codes that start with a zero use your ANSI codepage. The alt-codes are in decimal

In US English locale, the console codepage is CP-437 and the ANSI codepage is Windows-1252. The letter ñ is available in CP-437 at 164 and at 241 in Windows-1252. That's why the alt-codes that people suggested to you work.

But you are using Hungarian locale, so your ANSI encoding is Windows-1250, and your console encoding is different too (I'm not sure which one it is). They both do not have ñ. Windows-1250 has ń at 241.

There are several ways you can solve your problem:

  • install the Spanish keyboard layout and switch when needed;

  • switch your entire system to some Western European locale (not recommended);

  • enable hexadecimal Unicode Alt-codes: link;

  • install Microsoft Keyboard Layout Creator and create your own custom keyboard layout, with ñ and any other characters you want.

I had a similar problem and I picked the last solution.

Karol S

Posted 2015-01-01T22:56:00.503

Reputation: 228

In the given context (a Hungarian learning Spanish), I’d use the last solution too: use MSKLC to modify a Hungarian keyboard so that <kbd>AltGr</kbd><kbd>N</kbd> produces ñ (and similarly implement Ñ, ¿, and ¡). – Jukka K. Korpela – 2015-01-02T08:19:53.677

I made my own keyboards as well. It's not hard. – wendy.krieger – 2015-01-02T08:28:48.203

Thank you very much for the reply.

With a hungarian keyboard you can type most of the frequently used spanish letters except the "eñe". I've already installed spanish keyboard but if I change the input method it also changes the "í" "á" "ú" etc. So I think I'ts easeier and faster to just assing a key to "eñe".

I've installed Microsoft Keyboard Layout creator. It works like charm. Thank you very much ;-) – Cobol Tikal – 2015-01-02T09:18:36.377

0

Have you tried alt + 164? Try a different font.

TheKB

Posted 2015-01-01T22:56:00.503

Reputation: 813

Yes, I have tried that too. Doesn't work.

I don't know if it's depending on the font. No matter sofware I use (browser, word processor, etc.) always the same result :-/ – Cobol Tikal – 2015-01-01T23:11:27.640