Mac OS Roman

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Mac OS Roman
MIME / IANAmacintosh
Alias(es)mac, MacRoman, x-mac-roman
Language(s)English, various others
ClassificationExtended ASCII, Mac OS script
ExtendsASCII, Macintosh character set

Mac OS Roman is a character encoding created by Apple Computer, Inc. for use by Macintosh computers.[1] It is suitable for representing text in English and several other Western languages. Mac OS Roman encodes 256 characters, the first 128 of which are identical to ASCII, with the remaining characters including mathematical symbols, diacritics, and additional punctuation marks. Mac OS Roman is an extension of the original Macintosh character set, which encoded only 217 characters.[1] Full support for Mac OS Roman first appeared in System 6.0.4, released in 1989,[2] and the encoding is still supported in current versions of macOS, though the standard character encodings are now UTF-8 or UTF-16. Apple modified Mac OS Roman in 1998 with the release of Mac OS 8.5 by replacing the currency sign at position hexadecimal 0xDB with the euro sign,[3] but otherwise the encoding has been unchanged since its release.

Character set[edit]

The following table shows how characters are encoded in Mac OS Roman. The row and column headings give the first and second digit of the hexadecimal code for each character in the table.

Mac OS Roman[4]
0 1 2 3 4 5 6 7 8 9 A B C D E F
0x NUL SOH STX ETX EOT ENQ ACK BEL  BS   HT   LF   VT   FF   CR   SO   SI  
1x DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN  EM  SUB ESC  FS   GS   RS   US 
2x  SP  ! " # $ % & ' ( ) * + , - . /
3x 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4x @ A B C D E F G H I J K L M N O
5x P Q R S T U V W X Y Z [ \ ] ^ _
6x ` a b c d e f g h i j k l m n o
7x p q r s t u v w x y z { | } ~ DEL
8x Ä Å Ç É Ñ Ö Ü á à â ä ã å ç é è
9x ê ë í ì î ï ñ ó ò ô ö õ ú ù û ü
Ax ° ¢ [a] £ [a] § ß ® © [a] ´ ¨ Æ Ø
Bx ± [a] ¥ µ [a] π ª º Ω æ ø
Cx ¿ ¡ ¬ ƒ « » NBSP À Ã Õ Œ œ
Dx ÷ ÿ Ÿ [b]
Ex · Â Ê Á Ë È Í Î Ï Ì Ó Ô
Fx Apple logo black.svg[c] Ò Ú Û Ù ı ˆ ˜ ¯ ˘ ˙ ˚ ¸ ˝ ˛ ˇ
  1. ^ a b c d e The codes 0xA2, 0xA3, 0xA9, 0xB1, and 0xB5 coincidentally have the same character assignment as ISO 8859-1 (and thus Unicode).
  2. ^ Before Mac OS 8.5, the character at position 0xDB was the currency sign (¤), Unicode character U+00A4.
  3. ^ The character at position 0xF0 is a solid Apple logo. Apple uses Unicode character U+F8FF in the Corporate Private Use Area for this character, but it may not be supported on non-Apple systems.

Technical notes[edit]

The Internet Assigned Numbers Authority identifies this encoding using the string "macintosh". The MIME Content-Type for this encoding is therefore "text/plain; charset=macintosh". The Microsoft Windows code page number is 10000. IBM uses code page/CCSID 1275.[5][6][7][8]

With the release of Mac OS X, Mac OS Roman and all other "scripts" (as classic Mac OS called them) were replaced by UTF-8 as the standard character encoding for the Macintosh operating system. However, the default character encoding in Java for Mac OS X remained MacRoman,[9] and the keyboard layout with its combination of control, option, and dead keys still map to the original characters in MacRoman. The default character encoding for Java can be changed to UTF-8 by adding the following line to .profile:

JAVA_OPTS="${JAVA_OPTS:+$JAVA_OPTS }-Dfile.encoding=UTF-8"
export JAVA_OPTS

With Java 18 and later, the default character encoding is UTF-8 across platforms, including macOS.

See also[edit]

Notes[edit]

  1. ^ a b Apple Computer, Inc. (1993). Inside Macintosh: Text (PDF). p. 1-53. ISBN 0-201-63298-5. Retrieved July 10, 2021.
  2. ^ Apple Computer, Inc. (1991). Inside Macintosh, Volume VI. p. 14-104. ISBN 0-201-57755-0.
  3. ^ Apple Computer, Inc. (September 14, 1998). "Technical Note TN1104: The Euro Currency Symbol". Retrieved July 10, 2021.
  4. ^ Apple Computer, Inc. (1993). Inside Macintosh: Text (PDF). pp. 1–54, A-5–A-18. ISBN 0-201-63298-5. Retrieved July 10, 2021.
  5. ^ "Code page 1275 information document". Archived from the original on 2016-03-17.
  6. ^ "CCSID 1275 information document". Archived from the original on 2016-03-27.
  7. ^ Code Page CPGID 01275 (pdf) (PDF), IBM
  8. ^ Code Page CPGID 01275 (txt), IBM
  9. ^ "Java Development Guide for Mac: User Interface Toolkits for Java". Archived from the original on 2012-11-19.