1

I copied some code from a web page and into my text editor.

The double quote characters changed to this:

<iframe src=“http://www.yahoo.com” style=“width:500px; height:500px;” frameborder=“0?></iframe>

instead of this (which is what I needed):

<iframe src="http://www.yahoo.com" style="width:500px; height:500px;" frameborder="0"></iframe>

Why?

2
  • What editor are you using? Sep 29, 2009 at 20:12
  • I'm using Netbeans.
    – Karl
    Sep 29, 2009 at 22:15

3 Answers 3

2

Some editors don't handle "smart quotes" well or forcibly convert them to "dumb quotes".

EDIT: I read your examples backwards - the opposite happened: you got so-called "smart" quotes from plain ones. In some editors, that's a configurable setting. And understand that word processors are very different from ordinary text editors. Using Word as a text editor can do strange and damaging things to code or markup languages.

5
  • 1
    yup, change your editor :) +1
    – Molly7244
    Sep 29, 2009 at 18:49
  • 2
    I think he's saying that it converted "dumb" quotes to "smart" quotes. Which would imply that he's using a word processor of some nature, and not a text editor.
    – wfaulk
    Sep 29, 2009 at 19:08
  • @wfaulk - yah, you're right.
    – DaveE
    Sep 29, 2009 at 19:11
  • No, I'm not using a word processor - I'm using Netbeans, which is a programming IDE.
    – Karl
    Sep 29, 2009 at 22:16
  • I don't have NetBeans installed here, but a little googling found this: Tools -> Options -> Editing -> Editor Settings -> Java Editor -> Pair Character Completion. I'm not sure if the setting can be applied to the editor generally or is language-specific.
    – DaveE
    Oct 1, 2009 at 20:07
1

You need a text editor that's HTML aware e.g. Notepad++. Either that or something 'dumber' than the editor you're using (like Notepad) which won't attempt to 'smart-quote' your code.

1
  • Actually, any real text editor would do better than that, HTML-aware or not. Sep 29, 2009 at 21:28
0

Most likely the software is trying to be helpful. If, when you type a quote, it becomes a “ character, wouldn't you want it to do the same conversion when pasting in text?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .