Author |
Topic  |
|
RokDev
Starting Member
19 Posts |
Posted - 18 December 2007 : 10:07:13
|
Hi - when smart quotes (the curly ones that Word auto formats with) are posted in the forum they do not display.
I thought this would be a case of locating the ASCII number and using a replace function to alter the character, such as:
fString = Replace(fString, Chr(147), Chr(34))
or
fString = Replace(fString,"”",""")
Both of these methods work as i've tested them with other characters such as # or $ for example.
It seems that the forum is unable to understand what a smart quote is.
I have setup a simple web page using the same Replace function detailed above and it works fine - does the system have a funtion somewhere that strips this out?
I am seriously confused.
Thank in advance for any help, |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 18 December 2007 : 10:11:49
|
I put them in the bad word filter and change them to regular quotes. Works like a charm. Don't forget the smart apostrophe too.  |
Switch the order of your title tags |
 |
|
RokDev
Starting Member
19 Posts |
Posted - 18 December 2007 : 10:14:00
|
That sounds like a really good idea!! I'll give it a bash. Fingers crossed..... |
 |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 18 December 2007 : 10:14:04
|
I would highly recommend against using the actual smart quotes in your code. If you're set on using them, you might read this article describing some of your options along with the pros and cons of each. The biggest reason you *don't* want to directly use the smart quotes is that they are UTF-8 characters, and the most widely supported character encoding currently is ISO-8859-1, or Latin-1. UTF-8 can cause problems in some browsers, so it is not currently in wide use.
Edit: It looks like I misunderstood what you were asking. Looks like the question got answered, though. |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
Edited by - muzishun on 18 December 2007 10:14:55 |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
|
RokDev
Starting Member
19 Posts |
Posted - 18 December 2007 : 10:27:50
|
Unfortunately this doesn't work.
It seemed logical though.
The system just ignores the characters - it seems as if at the point where it grabs the character from the form during processing it is lost. If this is the case then the ChkBadWords function is merely unable to replace a character it cannot work with.
Odd that it works for you though.
Hmm
|
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 18 December 2007 : 10:33:59
|
Easiest way around this is to turn auto-format off or, better yet, use Notepad or Wordpad instead - Word is the spawn of Satan! 
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
RokDev
Starting Member
19 Posts |
Posted - 18 December 2007 : 10:35:54
|
I agree - but teaching 5000 users this has it's problems!!
The Badword idea may still prevail - there seems to be an update lag as I tried to change a word such as "hello" and nothing changed. So hopefully this idea will come good when the system updates in a timely manner. |
 |
|
RokDev
Starting Member
19 Posts |
Posted - 18 December 2007 : 10:47:31
|
Adding the smart quotes to the FORUM_Badwords table hasn't worked. Shame as I thought it would end my quest for a solution. |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 18 December 2007 : 11:34:15
|
Just tried it again on my forum and it works like a charm. I pasted them right out of Word into a post and the forum changed them nicely. Very odd that it doesn't work for you. Sorry. |
Switch the order of your title tags |
 |
|
RokDev
Starting Member
19 Posts |
Posted - 18 December 2007 : 12:08:28
|
Now this is really strange.
After continued investigation the Badwords filter idea works but only when you preview the message before posting. So the system recognises the smart quotes because it is able to change them. However, as soon as I hit the post (or reply) topic button the system is not inserting what is shown in the preview window but ignoring this altogether and stripping out the smart quotes from the string. Confused? I am! |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
|
|
Topic  |
|