Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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...

test

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

 
discard

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

Browse other questions tagged or ask your own question.