PDA

View Full Version : Quotation Marks in Code View


jimb
05-25-2005, 02:22 PM
I have just installed Dreamweaver MX 2004 on a new PC, I have been using Dreamweaver over 12 months on my old PC. Both PCs are Intel P4 based machines and run under Windows XP Pro SP2.

I have found that when editing JavaScript in code view on the new machine any closing double quotation mark appears as a single quotation mark. That is:

var stringVar = “sally”;
will appear as:
var stringVar = “sally’;

There is no problem with the code actually written by dreamweaver, it runs fine and also when the code is viewed in Notepad it appears as it should. I do, however, write some fairly complicated scripts and often have to use both double and single quotation marks in the same statement.

I assume that it is a formatting option and have been through the preferences (Edit | Preferences) and have compared the all of the settings on my two machines and have ensured that they are both identical.

Can anyone help please?

Regards
Jimb

ranjan
05-25-2005, 02:27 PM
that is strange...

can you confirm that this doesnot happen in another application notepad say...

jimb
05-25-2005, 02:38 PM
That is confirmed.

I have tried notepad, word, family tree maker and outlook. All behave as would be expected.

Regards

JimB

ranjan
05-25-2005, 02:43 PM
As i said this is strange, so bear wih me a little, lets try and get to the bottom of it.

<script>
var strVar="hello"
</script>

type out the above in a fresh dreamweaver document. if the conversion happens let it happen

save the file

open with notepad.... what do u see?

ranjan
05-25-2005, 02:48 PM
i just noticed....


Your line

var stringVar = “sally”;

My line

var strVar="hello"

Your line has smart quotes (word auto correct feature - replace straight quotes with smart quotes)

Have u copied and pasted your content from a word document????

ranjan
05-25-2005, 02:51 PM
finally whats your dreamweaver version and operating system

i am guessing dreamweaver 6.0.0 and win xp


Edit:Opps found the answers in your OP

jimb
05-25-2005, 03:09 PM
The message was copied and pasted from word, but the code in dreamweaver was typed directly into dreamweaver. It is actually code written into dreamweaver on my old machine and then ported across the network.

I have just done the little test that you asked for. In dreamweaver it is displayed as "hello' whilst when saved and then opened in notepad it is "hello".

However, if I put a carriage return straight after the closing double quote then it does stay as a double quote, but if i put anything else, such as a semicolon or a space then the closing double quote changes to a single. Just to complicate the issue if I say put a semicolon after the closing double quote, it will change to a single quote but if I go back and delete the semicolon the closing quote will change back to a double!

I feel sure that this is a facility that Macromedia have deliberately added and I can see that sometime it would be useful. However, I just want to turn it off!

Regards
JimB

ranjan
05-25-2005, 03:14 PM
ok a wild guess : font display issue

solution

1. change the code view font size (Edit >> Preferences >> Fonts Change code view font size from 9 (default) to 10)

2. change the font (Edit >> Preferences >> Fonts Change code view font from Courier New (default) to any other, i use proggyclean from http://www.proggyfonts.com/index.php?menu=download ('http://www.proggyfonts.com/index.php?menu=download') )

jimb
05-25-2005, 03:16 PM
Yes you are right about the version number and operating system, 6.0.0 and XP Pro (I said that at the begining of my first e-mail).

What do you mean by "Edit:Opps found the answers in your OP"?

I am running the same version of Dreamweaver with the same operating system on my older PC and I am not getting the same results.

Regards
Jim.

ranjan
05-25-2005, 03:27 PM
Yes you are right about the version number and operating system, 6.0.0 and XP Pro (I said that at the begining of my first e-mail).

Install the 6.1 updater please http://www.macromedia.com/software/dreamwe...pecial/updater/ ('http://www.macromedia.com/software/dreamweaver/special/updater/')

What do you mean by "Edit:Opps found the answers in your OP"?


I noticed your original post (OP) had already specified the versions

I am running the same version of Dreamweaver with the same operating system on my older PC and I am not getting the same results.

More reason to believe its a display issue.

NOTE : Your first post said Dreamweaver MX 2004 - This is dreamweaver 7.0.0 (There is a different updater to this version thant the link above)

Dreamweaver MX is version 6.0.0

http://www.macromedia.com/support/dreamwea...s_updaters.html ('http://www.macromedia.com/support/dreamweaver/downloads_updaters.html')

jimb
05-25-2005, 03:28 PM
Thank you very much, it is font clipping.

I have changed the font size to 10 and it just takes about a third off the right hand edge of the second up stroke of the double quote. Probably caused by the text within the double quotes and the quotes themselves being in italics. Also the screen on my new PC has a much higher resolution.

Thanks again.

regards

JimB

ranjan
05-25-2005, 03:54 PM
cool...

glad it worked out....

but i still recommend proggyclean as your code view font. if you do a lot of coding, you will appreciate the font, its very easy on the eye