I've created a web site based on moodle. I started out with a bunch of pdf's, but now I'm converting them to HTML. (From the original word docs.) I'm doing this via Dreamweaver and then pasting the HTML into the <> view of the Web Page resource.
The problem is that my client (and other folks) is on a OS 8.6 Mac using IE 5 and/or Netscape 7. When he looks at his stuff, he sees "?" (Question marks) for all the quotes and apostrophes, and probably other stuff I'm not seeing.
I've been very careful to strip out almost all the tags in Dreamweaver when I convert stuff. I'm only leaving <p><b><i><blockquote> tags. But the magic quotes are there. (I think they're called magic quotes). Anyway, is there a way to strip these out from existing moodle pages? I've already converted about 30 chapters this way, and I don't want to have to go through each one. These are scholarly chapters with tons of citations and quotations.
Is there a sql command to strip them from the database? A Moodle setting? What's the easy way out of this problem.
firstly, I think you should call them "smart quotes". if you talk about "magic quotes" people will you think you have a PHP problem, but this is not a PHP problem, this is an HTML problem.
“Smart quotes” look prettier than ordinary "double-quotes" but they need special handling in a webpage because they are not in the range of low-ASCII characters.
I have two suggestions for how to make the smart quotes appear correctly on your client's browser:
- change the encoding of your webpages to UTF-8. If this works it will be the simplest solution. However, if the smart quotes still appear strange on the client's screen, try suggestion (2)
- change all your smart quotes to HTML entities. Here are the codes you need to know:
If you would like help converting not only smart quotes but ALL similar characters to their named HTML-entity equivalents, the following tool may be useful:
Thank you very much for considering my problem.
I thought I had upgraded my stuff to UTF when I upgraded to 1.6. Can you give me some more specifics about how I "change the encoding of your webpages to UTF-8"? I created these pages using the "Web Page" resource within moodle itself.
I tried copying over en-us-utf8 from my moodledata directory into public-html/lang and now my quotes appear as little boxes in IE and on older computers. And they don't show up at all in firefox! This is going to make it even harder to fix the problem. Any suggestions about troubleshooting this?
There are examples on this page:
and this page:
Look near "paganism" above the title "Born to Groove could help people to:"
Thanks a lot.
The quotes around "paganism" are not smart quotes they are just ordinary double-quotes. I would have expected them to appear as HTML-entities, i.e. " , in the HTML source because my understanding is that double quotes should always appear thus in HTML source. However, they just appear as "
I would like to have a look at the page on my old Mac at work, but unfortunately (or fortunately depending on how you look at it) I am just about to embark on a three week trip and won't be back in the office till the end of August. I can't do much more just now I'm afraid. Sorry.
all the best
Maybe you have fixed this, but just to let you know that I had a look at the page on the following browsers on my old Mac (running OS9.2) and all the quotes appeared fine:
Can you give feedback on how you fixed this?
MAKE A DATABASE BACKUP8
go to admin/replace.php
copy a square, paste it in the field and fill in the appropriate character (' " ...)
Hit replace and lay back
Repeat this for all smart quotes you can find (left/right single and left/right double)
Thanks to yu!
Here's an addition to the above tip (thanks Koen and Yu!) that might be handy if you're struggling to work out what one of the broken characters was originally.
If you view the page with the broken character in your web browser and get the browser to display the page using the original encoding pre utf-8 encoding (in our case ISO-8859-1) then in amongst some other slightly strange looking characters the original broken character *should* reappear.
In IE, Firefox and Opera (and probably any other browser you care to mention) you can change the page encoding from the view menu. Don't forget to switch it back afterwards!