Questions tagged [mac-roman]

Mac OS Roman is a character encoding primarily used by the classic Mac OS to represent text. It encodes 256 characters, the first 128 of which are identical to ASCII, with the remaining characters including mathematical symbols, diacritics, and additional punctuation marks. It is suitable for English and several other Western languages. Mac OS Roman is a superset of the original Macintosh character set, used in System 1.

Mac OS Roman is a character encoding primarily used by the classic Mac OS to represent text. It encodes 256 characters, the first 128 of which are identical to ASCII, with the remaining characters including mathematical symbols, diacritics, and additional punctuation marks. It is suitable for English and several other Western languages. Mac OS Roman is a superset of the original Macintosh character set, used in System 1.

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". Mac OS Roman is also referred to as MacRoman or the Apple Standard Roman character set.

With the release of Mac OS X (now called macOS), Mac OS Roman and all other "scripts" (as the Mac OS called them) were replaced by UTF-8 as the standard character encoding for the Macintosh operating system. However, default character encoding in Java for macOS is still MacRoman (see Mac Dev Center), 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 .bashrc:

export set JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8"

Source: Wikipedia

15 questions
7
votes
4 answers

Converting Mac Roman character to equivalent UTF-8

I have been given some HTML files that use the Mac OS Roman file encoding. The files have French text, but in an editor many of the diacritical chars look strange (i.e. non French) Si cette option est sÈlectionnÈe, tentera de communiquer…
btschumy
  • 1,351
  • 16
  • 34
4
votes
1 answer

Is the MacRoman encoding guaranteed to be supported on all Java SE 1.5+ VMs?

Thanks to people who answered, I could realize I was indeed dealing with files encoded in "MacRoman": In which encoding is 0xDB a currency symbol? So I'm wondering: are charsets contained in lib/charsets.jar guaranteed to exist in all the 1.5…
NoozNooz42
  • 4,113
  • 6
  • 28
  • 51
3
votes
1 answer

Xcode keeps guessing and interpreting with wrong encoding

I am using Xcode 4.0.2, the latest release of Xcode. All my projects or standelone source codes are in UTF-8 encoding. But when I open some source file (C/C++/Objective C), all text is interpreted in Mac OS Roman encoding and I don't know why. I've…
maskov1
  • 31
  • 3
3
votes
0 answers

How to detect MacRoman encoding in PHP?

PHP's mb_detect_encoding() doesn't understand the MacRoman encoding. My app allows users to upload data in csv format and I need to convert it to utf8 because the users are not tech-savvy. I will never be able to get all of them to understand how to…
Kenny Wyland
  • 19,242
  • 24
  • 109
  • 205
2
votes
3 answers

How to *easily* display Korean characters in a Java program

I'd like to do this: System.out.println("안녕하세요!"); But I get a "Some characters could not be encoded using the MacRoman character encoding" popup error message when I try to compile in Eclipse. I'm running Mac OS X. Is there a way to get around…
Robz
  • 1,653
  • 3
  • 20
  • 34
1
vote
0 answers

PHP - Converting "Mac Roman" to UTF-8

So, I seem to have gotten some Mac Roman characters in my database, and because of my Encryption setup I convert everything to UTF-8 upon record fetch. The current code we're using to try and fix this is: if ( ! mb_check_encoding( $strDecrypted,…
joshbrw
  • 33
  • 6
1
vote
1 answer

Bundled Java OS X App Defaults to MacRoman Encoding

I have my Java project set up in Eclipse to use UTF-8 encoding. When I run the code within the IDE, it is run with UTF-8. However, when I bundle my Java project into an OS X app and run it from there, the Java code is run with MacRoman, as confirmed…
Thunderforge
  • 17,419
  • 14
  • 73
  • 117
1
vote
1 answer

Trying to show typical encoding/decoding error between MacRoman and Latin1

I would like to show my students the result of opening as macroman/latin1 a file encoded as latin1/macroman [resp.]: >>> s = u"Tout condamné à mort aura la tête tranchée." >>> print s.encode("latin1").decode("macroman") Tout condamnÈ ‡ mort aura la…
Aristide
  • 2,511
  • 2
  • 22
  • 40
0
votes
0 answers

How to read files that use unsupported encodings and/or charsets in Java

I need to read a CSV file into a Java application, but the file is encoded using Western (Mac OS Roman), which is unsupported in Java. It's been suggested I use Byte Stream to read in the text and convert everything over 128 to the space character…
MystikDan
  • 1
  • 1
0
votes
0 answers

PHP Create XML-File with "x-mac-roman" encoding

I have to create a xml-file with "x-mac-roman" encoding. The documentation of the program, I want to use the xml-file with, states: But neither DomDocument nor XMLWriter know this encoding. How can I…
Phantom
  • 541
  • 1
  • 5
  • 16
0
votes
2 answers

Can I have notepad not encode my files?

I have a notepad file. Well, its more of a .java file. The text is in Western MAC OS Roman (MacRoman) But when I save it, it gives me choices of how to encode it. Except, if I encode it, Java can't understand it! How can I have notepad NOT encode my…
Flarp
  • 129
  • 1
  • 10
0
votes
1 answer

Applescript's System Events forces Mac OS Roman encoding?

I have written an Applescript which reads the first line of a UTF-8 text file. That string is used to "set value" a particular text area of an IRC client (Textual). Unfortunately, any characters not native to Mac OS Roman encoding (unicode-only…
okapiho
  • 79
  • 1
  • 6
0
votes
1 answer

Illegal xml parsing import to sql mac roman

I have a xml that says it's encoding is UTF-8. When I use openxml to import data into sql, I always get "XML parsing: line xxxxxx, character xx, illegal xml character. Right now I can go to each line and replace it with the a legal character and it…
eripey
  • 315
  • 1
  • 2
  • 10
0
votes
2 answers

How to Validate a Character Compatible with MacRoman

Is there a simple way (a function, a method...) of validating a character that a user types to see if it's compatible with Mac OS Roman? I've read a few dozen topics to find out why an iOS application crashes in reference to…
El Tomato
  • 5,656
  • 5
  • 41
  • 66
0
votes
2 answers

MacRoman vs UTF-8

I am try to pull out byte data from a source, encrypt it, and then store it in the file system. For encryption, I am using jasypt and the BasicTextEncryptor class. And for storing on to the file system, I am using Apache's Commons IOUtils…