The built-in Mac OS X email client with the logical and uncomplicated name Mail has a lot to praise for - for example, for its developed system of filtering letters based on rules, for supporting additional plugins that expand the capabilities of mail (like encryption), for close integration with the iPhone client, etc. d. But Mail users also have plenty of reasons to be dissatisfied, especially if they do not live in English-speaking countries. The main reason is encoding. There is probably not a single Russian Mac owner who has not encountered in Mail.app what is commonly called the word “krakozyabry” - these are symbolic masterpieces like ÈØàÞÚÐï íÛÕÚâàØäØÚÐæØï, aaIb�baOaKaAb�baLaE or even Ш ирокРThere are errors in topic names, email contents, or attachment names.

Today we will tell you about the essence of this problem and some ways to solve it.

Mail.app is traditionally distinguished from other email clients by its increased sensitivity to what program was the email sent from?. The fact is that different email clients have their own peculiarities of marking and designing emails, invisible to the user’s eye, but perceived by servers and programs.

The problem is aggravated by the fact that in the Mail settings it is impossible to set the default encoding of incoming emails- i.e. a method of translating the letters, numbers and punctuation marks we are familiar with into the bits and bytes familiar to a computer. Mail tries to automatically recognize the encoding of incoming mail, and the user cannot directly influence this process in any way.

But it is possible to influence this process indirectly. The set of encodings that Mail uses for recognition depends on the set of used the entire encoding system. A This set, in turn, depends on number of languages ​​used by the system. It follows from this The first piece of advice is to remove all languages ​​you don’t use from your system.

Go to System Settings, select remote control "Language and Text" and you will see the following list:

Click on the button "Edit list" and uncheck the corresponding boxes. After this, restart your computer or end your session.

The presented screenshot was taken on Mac OS X 10.6.2. In Mac OS X 10.5, this settings panel is arranged somewhat differently, but editing the list of languages ​​there is organized in almost the same way.

The next step is setting up the Mail client itself. As we have already said, the program does not provide any permanent encoding settings. But this does not mean that they do not exist at all. In fact, You can still force Mail to work with a certain encoding through the Terminal.

But before you set the default encoding, you need to know what encoding it should be. This will have to be done experimentally:

  1. find several letters with krakozyabrs
  2. select the first one and go to the menu Message - Text Encoding
  3. sequentially try all encodings starting with the word "Cyrillic"(KOI8-R, ISO 8859-5, Windows) and UTF-8
  4. if the letter has become readable, look at the rest of the letters: if they can be read, then consider that a solution has been found
  5. otherwise, continue searching for encodings

If you have found a suitable encoding, all that remains is to fix it. Most likely it will be either the encoding KOI8-R, or UTF-8. Complete Mail completely (by combination Cmd+Q). Run Terminal(via Spotlight or from the folder Programs/Utilities), and enter the command:

defaults write com.apple.mail NSPreferredMailCharset koi8-r

defaults write com.apple.mail NSPreferredMailCharset utf-8

Then press Enter and close the Terminal.

If you don’t want to mess around with the Terminal, you can install and change the encoding through it:


If the option suggested above does not work, try entering another parameter through the Terminal:

defaults write com.apple.mail LeopardPreferredMailCharset utf-8

(or defaults write com.apple.mail LeopardPreferredMailCharset koi8-r)

Perhaps this will help you get rid of encoding problems in email subjects and text. WITH Russian names of attachments the situation is even more mysterious. Long-term observations suggest that it is not Mail that is to blame for their damage, but the program sending mail. For example, known glitch with letters from Thunderbird— almost always the names of attachments in Russian come to the Mac corrupted. To solve this problem in Thunderbird itself you need to change the value of the parameter mail.strictly_mime.parm_folding equal to one.

Thus, the causes and solutions to problems in Mail lie much deeper than it seems at first. If nothing helps, and letters addressed to you continue to arrive damaged, we advise you to pay attention to other email clients.

Most likely, many Mac users have had to work with txt files. Most often, various manuals, readme, instructions, etc. are presented in this format. And if these documents were created in a Windows environment, then when opening them on a Mac, a small but at the same time extremely unpleasant encoding problem may arise.

Let's figure out together how to teach a Mac to 100% recognize a txt file created on Windows.

The fact is that the operating systems of Apple and Microsoft are guided by different standards when encoding the Cyrillic alphabet, hence the problems with its display. There are special utilities designed to make Windows encoding compatible with Mac OS X, but I suggest you make do with standard tools.

Solution

The original encoding on Mac needs to be changed to Windows Cyrillic. To do this, find a hidden file in your home folder .CFUsertextEncoding.

To show hidden files you need to go to Terminal(programs > utilities) and enter the command (you can copy it).

Defaults write com.apple.finder AppleShowAllFiles -bool true

Killall Finder

and again enter.
In order to make the files hidden again, you need to replace in the first command true on false, and then restart Finder again.

So, right-click on this file and in the “open in program” subsection select TextEdit. There is only one line in the document where the value is needed 0x7 replaced by 0x502. Then we save the file, restart the Mac and rejoice.

If the article helped, don’t be lazy. Press the button - share!)

If you want to see on our website answers to your questions about everything related to Apple technology, the Mac OS X operating system (and its launch on a PC), write to us via or.

We received the following question:

I recently bought myself an iMac, I'm new to the Mac world, so sorry for the stupid question. everything is great, but it’s terribly annoying that MacOS can’t normally open text files in Russian. always shows some squiggles. how can this be fixed? Or should I open it in some other program?

This question should probably be included in the instructions for every new Mac sold in Russia. Indeed, either due to an oversight or laziness of the Mac OS X developers, the TextEdit text editor built into the system does not know how to work with Russian encodings text. Because of this, all txt text files created or edited in Windows look completely unreadable on Macs.

Fortunately, the problem is fixable - just look into the TextEdit settings. Go to their second tab, which is called "Discovery and Preservation":

We are interested in the drop-down list "Opening files." As you can see, by default the option is selected here "Automatically", and in vain. Moreover, if you look at the contents of the list, you will not see Windows encodings there at all. But this does not mean that they cannot be added there. In the drop-down list, select the lowest item - "Customize encoding list". Another window will open:

Check off the items in it "Cyrillic (Windows)" And "Cyrillic (KOI8-R)". You can also select all other Russian and Cyrillic encodings. After this, there is a chance that TextEdit will work normally. If not, then in the already mentioned list "Opening files" instead of "Automatically" select "Cyrillic (Windows)". Then the problems with Russian texts will definitely disappear.

I found the WINDOWS-1252 encoding to be the least frustrating when working with Excel. Since it has its own custom set of characters based on Microsoft, it can be assumed that it will work on both Mac and Windows versions of MS-Excel. Both versions at least include an appropriate "File origin" or "File encoding" selector that reads the data correctly.

Depending on your system and the tools you use, this encoding may also be called CP1252, ANSI, Windows (ANSI), MS-ANSI, or simply Windows, among other variations.

This encoding is a superset of ISO-8859-1 (aka LATIN1 and others), so you can fall back to ISO-8859-1 if for some reason you can't use WINDOWS-1252. Be aware that ISO-8859-1 is missing some characters from WINDOWS-1252, as shown below:

| Char | ANSI | Unicode | ANSI Hex | Unicode Hex | HTML entity | Unicode Name | Unicode Range | | € | 128 | 8364 | 0x80 | U+20AC | € | euro sign | Currency Symbols | | ‚ | 130 | 8218 | 0x82 | U+201A | ‚ | single low-9 quotation mark | General Punctuation | | ƒ | 131 | 402 | 0x83 | U+0192 | ƒ | Latin small letter f with hook | Latin Extended-B | | „ | 132 | 8222 | 0x84 | U+201E | „ | double low-9 quotation mark | General Punctuation | | ... | 133 | 8230 | 0x85 | U+2026 | ... | horizontal ellipsis | General Punctuation | | † | 134 | 8224 | 0x86 | U+2020 | † | dagger | General Punctuation | | ‡ | 135 | 8225 | 0x87 | U+2021 | ‡ | double dagger | General Punctuation | | ˆ | 136 | 710 | 0x88 | U+02C6 | ˆ | modifier letter circumflex accent | Spacing Modifier Letters | | ‰ | 137 | 8240 | 0x89 | U+2030 | ‰ | per mille sign | General Punctuation | | Š | 138 | 352 | 0x8A | U+0160 | Š | Latin capital letter S with caron | Latin Extended-A | | ‹ | 139 | 8249 | 0x8B | U+2039 | ‹ | single left-pointing angle quotation mark | General Punctuation | | Œ | 140 | 338 | 0x8C | U+0152 | Œ | Latin capital ligature OE | Latin Extended-A | | Ž | 142 | 381 | 0x8E | U+017D | | Latin capital letter Z with caron | Latin Extended-A | | ‘ | 145 | 8216 | 0x91 | U+2018 | ‘ | left single quotation mark | General Punctuation | | ’ | 146 | 8217 | 0x92 | U+2019 | ’ | right single quotation mark | General Punctuation | | " | 147 | 8220 | 0x93 | U+201C | “ | left double quotation mark | General Punctuation | | " | 148 | 8221 | 0x94 | U+201D | ” | right double quotation mark | General Punctuation | | | 149 | 8226 | 0x95 | U+2022 | . | bullet | General Punctuation | | – | 150 | 8211 | 0x96 | U+2013 | - | en dash | General Punctuation | | - | 151 | 8212 | 0x97 | U+2014 | — | em dash | General Punctuation | | ˜ | 152 | 732 | 0x98 | U+02DC | ˜ | small tilde | Spacing Modifier Letters | | ™ | 153 | 8482 | 0x99 | U+2122 | ™ | trade mark sign | Letterlike Symbols | | š | 154 | 353 | 0x9A | U+0161 | š | Latin small letter s with caron | Latin Extended-A | | › | 155 | 8250 | 0x9B | U+203A | › | single right-pointing angle quotation mark | General Punctuation | | – | 156 | 339 | 0x9C | U+0153 | – | Latin small ligature oe | Latin Extended-A | | ž | 158 | 382 | 0x9E | U+017E | | Latin small letter z with caron | Latin Extended-A | | Ÿ | 159 | 376 | 0x9F | U+0178 | Ÿ | Latin capital letter Y with diaeresis | Latin Extended-A |

Please note that the sign no euro. This table can be found in Alan Wood.

Conversion

Conversion is performed differently in each tool and language. However, let's say you have a query_result.csv file that you know is UTF-8 encoded. Convert it to WINDOWS-1252 using iconv:

Iconv -f UTF-8 -t WINDOWS-1252 query_result.csv > query_result-win.csv

I feel that there will be many more posts with the leitmotif “ours landed on the moon”, because, like those mice, I continue to master the cactus. And the cactus, although it looks like an apple, and smells like an apple, and is essentially an apple, throws up so many thorns that it’s impossible to Google it. Figurnov didn’t publish anything about Mac there? I have an acute deja vu of my first acquaintance with Windows.

Nowadays I'm faced with Russian file names, it's an old problem, but I've never sat so tightly on an Apple Mac before.

That's the point. Someone sends an archive from a PC, inside there are Russian names of files or folders, you download it in Safari and get this:

The first part of the problem is that the regular archiver either does not always, or never, understands Russian file names. We need to change it. I always installed WinRAR on Windows, this was one of the first actions after installation, but here I decided to go with the free The Unarchiver, it integrates into the system and unpacks everything correctly.

The second part of the problem is that Safari, after downloading, always unpacked the archive itself using a regular archiver, the one who does not understand anything. It can be treated by entering Safari settings and unchecking the “open safe files after downloading” checkbox (at the very bottom):

Installing The Unarchiver does not solve the problem, because it becomes a “standard opener” for ZIP only in the Finder, and for Safari that Finder is not an authority at all.

Question: Is there an archiver that overcomes this glitch?

And so, everything is intuitively clear for housewives, but only those with Google in their heads. I feel like I need to somehow force myself, in accordance with the covenants, to stop using it this way, but I can’t figure out how to do it.

P.S. Well, in order not to get up twice, let me remind you that I unpack archives on the iPhone/iPad