New Forum | Previous | Next | (P-PDF) Developers
Topic: Handling 'smart quotes' from pasted MS-Word docs on form submit
Conf: (P-PDF) Developers, Msg: 129104
Date: 3/10/2005 06:14 AM
have an Acrobat 5 PDF form that is submitted by calling the "this.submitForm()" method. I'm submitting this way because I'm passing a web server variable into a hidden field on the form so that I don't have to change the web server in the submit every time I migrate from our development to production server.
The form is submitted to a Cold Fusion action page.
The problem comes in when there is text that is pasted in from a Microsoft Word document that contains "smart quotes"; i.e. curly single- or double-quotes.
For a standard HTML [textarea], I can just replace the Ascii value of 8216, 8217, 8220, and 8221 with the appropriate Ascii value for the straight quotes (39 or 34). But the Acrobat submit seems to do something different. I get something that looks like this: �.
As a test, I tried an fdf export of a field with this type of entry, and it exports the "smart quotes" as follows:
left curly double quote = \215
right curly double quote = \216
left curly single quote = \217
right curly single quote = \220
But I have to use the HTML export. I would think it would handle them the same way as an HTML text area would, but obviously Acrobat is doing something to them once they're in the PDF file.
Can someone please tell me what I need to trap for in looking at what this function exports? Then it would be an easy matter to substitute the straight quotes. Thanks.