UTF-8 encoding when writing to a PDF

2012-09-27 Thread Brook Davies

I am totally stuck on this one. I am using an old Ben Forta tag cf_pdfform.
I’m still using it because it makes writing to a PDF form and populating
fields easier than using the native cfpdf form population methods.

The problem is that any strings with UTF-8 characters get truncated at the
first character.

The method basically takes an XMl string of form data and the PDF form/file
and returns the populated PDF document (in this case in bytes). The XML I am
testing with looks good:

 Grave accent (à, è, ù): Over a or u, used primarily
to distinguish homophones: à ("to") vs. a ("has"), ou ("or") vs1. où
("where", note that ù exists1 only in this word). Over an e, 1indicates the
sound

// PDF form input stream
formIS=CreateObject("java", "java.io.FileInputStream");
formIS.init(ARGUMENTS.PDFForm);

// Get PDF document object
PDFfactory=server.javaLoader.create("com.adobe.pdf.PDFFactory");
PDFdoc=PDFfactory.openDocument(formIS);

// Convert raw XML data to byte array
bytes=ARGUMENTS.XMLData.getBytes("UTF-8");
byteArrayIS=CreateObject("java", "java.io.ByteArrayInputStream");
byteArrayIS.init(bytes);

// Perform actual import
PDFdoc.importFormData(byteArrayIS);

//Call the PDFDocument object's save method
outputIS=PDFdoc.save();

// Read bytes
byteClass=CreateObject("java", "java.lang.Byte").TYPE;
PDFBytes=CreateObject("java",
"java.lang.reflect.Array").newInstance(byteClass, outputIS.available());

// And store them
outputIS.read(PDFBytes);

But when I executed the code below and then write the bytes via CFILE
CHARSET=”UTF-8”, the form field data is truncated in the resulting PDF.
Anybody have any ideas?

Brook



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352781
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFMAIL Problem with new TLDs

2012-09-27 Thread Cameron Childress

The .ca domain belongs to Canada and is 24 years old (
http://en.wikipedia.org/wiki/.ca).

I suspect your problem lies elsewhere.

-Cameron

On Thu, Sep 27, 2012 at 3:10 PM, Robert Harrison   > On CF9, cfmail seems to be having a problem sending email to some of the
> > newer address, like som...@sprucegrove.ca . This is a valid email
> > address, but CF9 CFMAIL is chocking on this and a other valid addresses
> > that use the newer two character TLDs.
> >
> > If I try to send to that address, CFMAIL bombs and halts. If I wrap it in
> > CFTRY with a CFCATCH to show me the failures, it's failing on several of
> > the new TLDs.
> >
> > Does anyone know if there is a patch for this or something?
>


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352780
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFMAIL Problem with new TLDs

2012-09-27 Thread Russ Michaels

CF will try to send an email to any address you give it, even a complete
nonsense address, it is the SMTP server that will reject it. I have never
had any issues sending emails to 2 letter TLD's such as .co or .ca
So you should firstly investigate DNS and SMTP issues

On Thu, Sep 27, 2012 at 3:10 PM, Robert Harrison  wrote:

>
> On CF9, cfmail seems to be having a problem sending email to some of the
> newer address, like som...@sprucegrove.ca . This is a valid email
> address, but CF9 CFMAIL is chocking on this and a other valid addresses
> that use the newer two character TLDs.
>
> If I try to send to that address, CFMAIL bombs and halts. If I wrap it in
> CFTRY with a CFCATCH to show me the failures, it's failing on several of
> the new TLDs.
>
> Does anyone know if there is a patch for this or something?
>
> Thanks
>
> Robert Harrison
> Director of Interactive Services
>
> Austin & Williams
> Advertising I Branding I Digital I Direct
> 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
> T 631.231.6600 X 119   F 631.434.7022
> http://www.austin-williams.com
>
> Blog:  http://www.austin-williams.com/blog
> Twitter:  http://www.twitter.com/austin_
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352779
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CFMAIL Problem with new TLDs

2012-09-27 Thread Robert Harrison

On CF9, cfmail seems to be having a problem sending email to some of the newer 
address, like som...@sprucegrove.ca . This is a valid email address, but CF9 
CFMAIL is chocking on this and a other valid addresses that use the newer two 
character TLDs. 

If I try to send to that address, CFMAIL bombs and halts. If I wrap it in CFTRY 
with a CFCATCH to show me the failures, it's failing on several of the new 
TLDs. 

Does anyone know if there is a patch for this or something?

Thanks

Robert Harrison 
Director of Interactive Services

Austin & Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352778
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: What does "+no+post+sending+forms+are+found" do?

2012-09-27 Thread JR

I think this might be from XRumer, a forum/blog spam program. Someone
posted about the same message a few months ago.

John

On Wed, Sep 26, 2012 at 10:00 PM, Les Mizzell  wrote:

>
> On 9/25/2012 6:13 PM, =?ISO-8859-1?Q?Claude_Schn=E9egans wrote:
> > It looks like a search engine which is clumsily redirecting search
> result to some of your pages.
> >
>
> Looking up the IP address it came from:
>
> IP: 194.190.33.234
> Decimal:3267240426
> Hostname:   194.190.33.234
> ISP:ROSNIIROS Russian Institute for Public Networks
> Organization:   CJSK Uchrezhdencheskij telefonnyj uzel
> Services:   Suspected network sharing device
> 
> Recently reported forum spam source. (165)
> Type:   Broadband 
> Assignment: Static IP 
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352777
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm