Mac Format

MAC SOFTWARE

Resolving riddles and restrictio­ns with what you want to run on your Mac Copied links are broken

- byniCo van rossum

We resolve restrictio­ns with your Mac apps

QWhen I copy an Internet link containing accented characters from a PDF using Preview, why does it always break, but copies correctly when the document is opened in Acrobat Reader?

AThis is a strange problem which results from an unfortunat­e coincidenc­e of features in Unicode, PDF and macOS. In Unicode text encoding, most accented characters (and others in non-Roman scripts such as Korean) have two different codes which can produce them. For example, the Nordic letter Å can be assigned the ‘code point’ of an alphabetic­al character, or that for the symbol for a unit of length, the Ångström. The same character is thus represente­d by two different code points.

Most PDF don’t store text in Unicode, but use old variants of encoding tables that don’t make any such distinctio­n, and represent both those Unicode forms using a single character.

When macOS converts that character from PDF, it can choose to provide it in either of the Unicode encodings, and almost invariably macOS, and Preview, opts for the form that’s most compatible with file-naming convention­s on the Mac, known as Form D. Apps like Acrobat Reader use their own PDF engine, and opt for the other Unicode character, Form C.

While Form D may be better for filenames, the characters most usually entered at the keyboard, so used in Internet links, are Form C. You’ll therefore find copying from Acrobat Reader less troublesom­e, or you can convert using my free tools Apfelstrud­el and unorml from bit.ly/mf343texut­il.

Newspapers in English

Newspapers from Australia