Currency signLowercase n with tilde
ASCII 164 is ¤ on Windows and ñ in old DOS.
¤ (Currency Sign) is byte 164 in Windows-1252, Unicode U+00A4. It stands for a currency without saying which one. Developers meet it in number format patterns: Java's DecimalFormat and the CLDR locale data write ¤#,##0.00, and the ¤ is swapped for the real symbol at runtime. If ¤ shows up where a price should say €, check whether the text is ISO-8859-15 being read as ISO-8859-1 or Windows-1252. Latin-9 put the euro sign exactly on this byte, 0xA4, so 10 € becomes 10 ¤, and decoding as ISO-8859-15 brings the euro back. In UTF-8 it's C2 A4, and the HTML entity is ¤.
ñ (Small N with Tilde) is byte 164 in code page 437, the original IBM PC character set, and maps to Unicode U+00F1. Windows-1252 has the currency sign ¤ at 164, so Spanish DOS text read as Windows-1252 turns España into Espa¤a. Code page 850 kept ñ at 164 too. Capital Ñ is 165 in DOS.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 164 is ¤.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u00A4\n"); /* UTF-8: C2 A4 */unsigned char b = 164; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 164 0xA4 */return 0;}
#include <stdio.h>int main(void) {/* Byte 164 is ñ only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0xA4 is invalid and prints as garbage, often �. */putchar(164);/* char is signed on x86, so a plain char holding 0xA4 is -92.Use unsigned char when you compare or index by byte value. */char c = (char)164;unsigned char u = 164;printf("\n%d %d\n", c, u); /* -92 164 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u00F1\n"); /* C3 B1 */return 0;}
ñ is also ASCII 241 on Windows, which has the full guide.
Your locale has no country part, and Java picks the currency from the country, so it falls back to the generic ¤ (currency code XXX). Pass a full locale such as `Locale.forLanguageTag("es-ES")` and you'll get €. If the currency shouldn't follow the region at all, keep the locale and call `setCurrency(Currency.getInstance("EUR"))` on the formatter.
It asks for the ISO 4217 code instead of the symbol. One ¤ turns into $ or €, while ¤¤ turns into USD or EUR, which removes the guesswork when several currencies in the same list use $. Java's DecimalFormat stops at two, but ICU-based formatters also read ¤¤¤ as the long name, such as US dollars.
Nothing in particular. ¤ is the generic currency sign, and Nordic layouts put it on Shift+4, where US keyboards have $. You'll rarely need it in everyday text. If you were looking for the dollar sign, it's on AltGr+4 on Swedish and Finnish layouts.
The file was saved in a DOS code page and is being read as Windows-1252. DOS keeps ñ at 164, which Windows-1252 shows as ¤, and Ñ comes out as ¥, so AÑO arrives as A¥O. Convert it once with `iconv -f CP850 -t UTF-8 old.txt > fixed.txt`. Pick CP850 over 437 for Spanish text, because 437 has no Á, Í, Ó or Ú.
The zero changes which table Windows looks in. Without it, the code goes through your DOS code page, and 437 and 850 both have ñ at 164. With it, Windows-1252 is used, where 164 is the currency sign. The zero-prefixed codes are Alt+0241 for ñ and Alt+0209 for Ñ.
The file was saved in a DOS code page and is being read as Windows-1252. DOS keeps ñ at 164, which Windows-1252 shows as ¤, and Ñ comes out as ¥, so AÑO arrives as A¥O. Convert it once with `iconv -f CP850 -t UTF-8 old.txt > fixed.txt`. Pick CP850 over 437 for Spanish text, because 437 has no Á, Í, Ó or Ú.
The zero changes which table Windows looks in. Without it, the code goes through your DOS code page, and 437 and 850 both have ñ at 164. With it, Windows-1252 is used, where 164 is the currency sign. The zero-prefixed codes are Alt+0241 for ñ and Alt+0209 for Ñ.