Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Anyone out there with Macs and the TextMate editor know how to make it save files always in ASCII, and never let it turn on smart quotes, smart dashes, and smart copyright symbol? There's a client I work with who has this, and when his file gets saved in Unicode mode like this, the PHP session variables don't work because the host headers get messed up with the Unicode content that follows. In fact, if I do this at the top of the file...

<?php die('test'); ?>

...the output on the web server becomes the word test with the Unicode BOM (Byte Order Mark) in front of it, which looks like this...


When I inspect his file with a hex editor, I find the BOM as the first character, and then find smart quotes (the left and right curled quotes, either double or single), smart dashes (replaces -- with the long dash like —), and the copyright, trademark, and registered trademark symbols become Unicode equivalents instead of using &copy;, &trade;, and &reg;.

share|improve this question
Someone responded on my Facebook query on this and said switch from TextMate to Sublime Text 2 editor. – Volomike May 16 '12 at 17:16
You can turn off smart pairing in its preferences, but I've never seen that happen. Which language is selected for the file? And are there any special bundle commands defined that insert these "smart" characters rather than their ASCII "equivalents"? – slhck May 16 '12 at 17:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.