Re: ColdFusion and AJAX choices
Carrying 300K of JS code (min) just to do something that takes 10 lines (or less) of JS code is nonsense. Not even speaking about its terrible performance. >jQuery + infinity ~| 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:344637 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfhttp response with non-english characters gets cut off
Dump HTTP headers and look at Content-Type header. There is a "charset" attribute that specifies the input stream encoding. Most likely it is missing or incorrect. If the "charset" is missing, CF assumes UTF-8. However, in UTF-8 any char with the code higher than 127, is treated as an escape code that initiates multibyte sequence (up to 6 bytes). Not all sequences are valid UTF-8 sequences. When CF tries to convert not valid UTF-8 stream, the truncation or abort happens. Any 8-bit code that uses high codes, will not be converted correctly, unless the proper charset setting is used. Looks like your case. Same will happen, if HTTP header says UTF-8, but the stream is, actually, some 8-bit national encoding. MSXML does not make any conversion. It assumes your default codepage (8-bit) and makes UTF-16 out of this. This is why you get all characters, but not necessarily correct ones. Resume. Provide correct charset parameter in CFHTTP. This might be tricky, since you may not always know how the original stream was encoded. ~| 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:344636 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
The variables scope isn't local. It's global to CFC or to the page. On May 18, 2011, at 8:56 PM, "Eric Roberts" wrote: > > So is there any real benefit in using or not using "variables." For local > variables? > > -Original Message- > From: Maureen [mailto:mamamaur...@gmail.com] > Sent: Wednesday, May 18, 2011 12:40 PM > To: cf-talk > Subject: Re: scoping > > > ALWAYS SCOPE! > > Especially if someone else might have to maintain the code someday. > > On Wed, May 18, 2011 at 9:51 AM, Eric Roberts > wrote: >> >> We had a discussion at work as to whether or not we should scope local >> vars with the "variables." scope since that is implied in a cfset. >> One camp says it is not needed because of the implicit scoping when >> using cfset...the other camp says it is better to tack on "variables." >> and make it explicit for security and readability. Any thoughts? >> >> Er > > > > ~| 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:344635 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
Yes, the real benefit is that you always know which scope is being referenced, with no ambiguity. On Wed, May 18, 2011 at 6:56 PM, Eric Roberts wrote: > > So is there any real benefit in using or not using "variables." For local > variables? ~| 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:344634 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: scoping
The other camp's argument (for the variables scope): it is not necessary so why do it? Eric (who is in the scope everything camp) -Original Message- From: John Allen [mailto:johnfal...@gmail.com] Sent: Wednesday, May 18, 2011 03:05 PM To: cf-talk Subject: Re: scoping +1 for always scoping. Clearer to read, small performance gain, small security gain and why not. On Wed, May 18, 2011 at 3:23 PM, Mike Chabot wrote: > > Always scope your variables, unless you have a specific reason not to. > It reinforces a good habit and demonstrates to anyone reviewing your > code that you know what scoping variables is all about. I would > estimate that roughly 100% of experienced CF programmers would agree > that scoping local variables does more good than harm. Even though > scoping local variables doesn't add much value to the Web site, it > does help separate you from the masses of inexperienced CF programmers, and that is enough of a reason to do it. > > -Mike Chabot > On Wed, May 18, 2011 at 12:51 PM, Eric Roberts < > ow...@threeravensconsulting.com> wrote: > > > > > We had a discussion at work as to whether or not we should scope > > local > vars > > with the "variables." scope since that is implied in a cfset. One > > camp says it is not needed because of the implicit scoping when > > using cfset...the other camp says it is better to tack on > > "variables." and make it explicit for security and readability. Any > > thoughts? > > > > Eric > > > > > > > > ~| 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:344633 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: scoping
A good question that was brought up by one of our developers. When you don't scope a var it has to search through the various scopes to find it, in order of precedence. If you are using alocal scope, is there a performance hit if you don't scope it since "variables" is implied or does it still go into search mode? Also...is this negated of you use a cfset on the top of the page (again...this is only referring to local vars.) Eric -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Wednesday, May 18, 2011 01:36 PM To: cf-talk Subject: Re: scoping Here's my take on it: http://www.cfgears.com/index.cfm/2010/9/22/The-importance-of-proper-variable -scoping Thanks, Eric Cobb http://www.cfgears.com Help me make a difference this summer -http://bit.ly/i8dJvQ On 5/18/2011 11:51 AM, Eric Roberts wrote: > We had a discussion at work as to whether or not we should scope local > vars with the "variables." scope since that is implied in a cfset. > One camp says it is not needed because of the implicit scoping when > using cfset...the other camp says it is better to tack on "variables." > and make it explicit for security and readability. Any thoughts? > > Eric > > > ~| 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:344632 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: scoping
So is there any real benefit in using or not using "variables." For local variables? -Original Message- From: Maureen [mailto:mamamaur...@gmail.com] Sent: Wednesday, May 18, 2011 12:40 PM To: cf-talk Subject: Re: scoping ALWAYS SCOPE! Especially if someone else might have to maintain the code someday. On Wed, May 18, 2011 at 9:51 AM, Eric Roberts wrote: > > We had a discussion at work as to whether or not we should scope local > vars with the "variables." scope since that is implied in a cfset. > One camp says it is not needed because of the implicit scoping when > using cfset...the other camp says it is better to tack on "variables." > and make it explicit for security and readability. Any thoughts? > > Er ~| 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:344631 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
I'm going to jump in on the side of variable scoping for another excellent reason: programmers don't tend to use words precisely and that ends up with confusion. When we say: variables.foo = 'bar'; we are not setting a "local" variable. We're setting a key and value in the variables scope which lives in the request scope. When we say (in CF9 and Railo 3.x): var foo = 'bar'; or local.foo = 'bar'; we are setting a key and value in a scope that is local to the function (if we are inside one) that cannot be seen outside of that function. If we set variables.foo (I believe) inside a function it will be a request scoped variable and available to access outside that function. And if we just say: foo = 'bar'; the behavior depends on whether you are inside a function or outside a function and which version of CF/Railo you are on and, if I recall my Railo settings correctly, the default behavior can be switched around in the administrator as to what scope unscoped variables will end up in. Which, of course, means that your code may not even run the same on a production server as it does on your dev box. So, in short: If you scope your variables, they should work the same everywhere. If you do not, they *may* work the same but then again they may not. So scope your variables so they aren't so variable :) Judah On Wed, May 18, 2011 at 12:23 PM, Mike Chabot wrote: > > Always scope your variables, unless you have a specific reason not to. It > reinforces a good habit and demonstrates to anyone reviewing your code that > you know what scoping variables is all about. I would estimate that roughly > 100% of experienced CF programmers would agree that scoping local variables > does more good than harm. Even though scoping local variables doesn't add > much value to the Web site, it does help separate you from the masses of > inexperienced CF programmers, and that is enough of a reason to do it. > > -Mike Chabot ~| 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:344630 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
+1 for always scoping. Clearer to read, small performance gain, small security gain and why not. On Wed, May 18, 2011 at 3:23 PM, Mike Chabot wrote: > > Always scope your variables, unless you have a specific reason not to. It > reinforces a good habit and demonstrates to anyone reviewing your code that > you know what scoping variables is all about. I would estimate that roughly > 100% of experienced CF programmers would agree that scoping local variables > does more good than harm. Even though scoping local variables doesn't add > much value to the Web site, it does help separate you from the masses of > inexperienced CF programmers, and that is enough of a reason to do it. > > -Mike Chabot > On Wed, May 18, 2011 at 12:51 PM, Eric Roberts < > ow...@threeravensconsulting.com> wrote: > > > > > We had a discussion at work as to whether or not we should scope local > vars > > with the "variables." scope since that is implied in a cfset. One camp > > says > > it is not needed because of the implicit scoping when using cfset...the > > other camp says it is better to tack on "variables." and make it explicit > > for security and readability. Any thoughts? > > > > Eric > > > > > > > > ~| 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:344629 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
Always scope your variables, unless you have a specific reason not to. It reinforces a good habit and demonstrates to anyone reviewing your code that you know what scoping variables is all about. I would estimate that roughly 100% of experienced CF programmers would agree that scoping local variables does more good than harm. Even though scoping local variables doesn't add much value to the Web site, it does help separate you from the masses of inexperienced CF programmers, and that is enough of a reason to do it. -Mike Chabot On Wed, May 18, 2011 at 12:51 PM, Eric Roberts < ow...@threeravensconsulting.com> wrote: > > We had a discussion at work as to whether or not we should scope local vars > with the "variables." scope since that is implied in a cfset. One camp > says > it is not needed because of the implicit scoping when using cfset...the > other camp says it is better to tack on "variables." and make it explicit > for security and readability. Any thoughts? > > Eric > > > ~| 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:344628 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
Here's my take on it: http://www.cfgears.com/index.cfm/2010/9/22/The-importance-of-proper-variable-scoping Thanks, Eric Cobb http://www.cfgears.com Help me make a difference this summer -http://bit.ly/i8dJvQ On 5/18/2011 11:51 AM, Eric Roberts wrote: > We had a discussion at work as to whether or not we should scope local vars > with the "variables." scope since that is implied in a cfset. One camp says > it is not needed because of the implicit scoping when using cfset...the > other camp says it is better to tack on "variables." and make it explicit > for security and readability. Any thoughts? > > Eric > > > ~| 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:344627 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
This is my outlook although I do not do something like: instead I do: But I always would do: #Variables.strBlah# or Seems to me that is what the original OP is asking about but perhaps I am reading too much into it based upon what I do. This is all in reference to just straight CFM pages. On Wed, May 18, 2011 at 12:40 PM, Maureen wrote: > > ALWAYS SCOPE! > > Especially if someone else might have to maintain the code someday. > > On Wed, May 18, 2011 at 9:51 AM, Eric Roberts > wrote: > > > > We had a discussion at work as to whether or not we should scope local > vars > > with the "variables." scope since that is implied in a cfset. One camp > says > > it is not needed because of the implicit scoping when using cfset...the > > other camp says it is better to tack on "variables." and make it explicit > > for security and readability. Any thoughts? > > > > Er > > ~| 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:344626 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re:
Sounds like there's something else going on that would cause a blank at the beginning, if that's what you're seeing, but the code you've got there will also *always* append an extra page break after every record, including the first one. Try this instead: ... query output stuff ... ... end query output stuff ... From: "Stephens, Larry V" Sent: Wednesday, May 18, 2011 2:10 PM To: "cf-talk" Subject: ... query output stuff ... ... end query output stuff ... What I expect is a pdf file with no blank pages if there is one record. (Haven't tested it yet with multiple records.) What I get (with one record) is a blank page at the top and then my data. Why does this give me a blank page at the top (and can I stop it)? ~| 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:344625 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cf-talk@houseoffusion.com
... query output stuff ... ... end query output stuff ... What I expect is a pdf file with no blank pages if there is one record. (Haven't tested it yet with multiple records.) What I get (with one record) is a blank page at the top and then my data. Why does this give me a blank page at the top (and can I stop it)? ~| 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:344624 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfhttp response with non-english characters gets cut off
On 5/18/2011 10:35 PM, morgan l wrote: > characters, Greek letters etc). As far as I can tell, all the characters are > valid utf-8, but the cfhttp call fails with "Connection Failure" in the how do you know that these are valid UTF-8? if plain folks are uploading them, chances are you've got a zoo of page encodings. any chance there's a zero byte in there some place? cf's never liked those. ~| 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:344623 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
ALWAYS SCOPE! Especially if someone else might have to maintain the code someday. On Wed, May 18, 2011 at 9:51 AM, Eric Roberts wrote: > > We had a discussion at work as to whether or not we should scope local vars > with the "variables." scope since that is implied in a cfset. One camp says > it is not needed because of the implicit scoping when using cfset...the > other camp says it is better to tack on "variables." and make it explicit > for security and readability. Any thoughts? > > Er ~| 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:344622 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
Ray Camden has blogged about this in the past, as you can read here: http://www.coldfusionjedi.com/index.cfm/2011/1/26/ColdFusion-and-Unscoped-Variables In summary, there are theoretical performance gains by scoping all variables and there are some security concerns by not scoping vars. Both are discusses in Ray's post. On Wed, May 18, 2011 at 12:51 PM, Eric Roberts wrote: > > We had a discussion at work as to whether or not we should scope local vars > with the "variables." scope since that is implied in a cfset. One camp says > it is not needed because of the implicit scoping when using cfset...the > other camp says it is better to tack on "variables." and make it explicit > for security and readability. Any thoughts? > > Eric > > > ~| 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:344621 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scoping
Local scope is only implied when using cf9 On May 18, 2011, at 11:51 AM, Eric Roberts wrote: > > We had a discussion at work as to whether or not we should scope local vars > with the "variables." scope since that is implied in a cfset. One camp says > it is not needed because of the implicit scoping when using cfset...the > other camp says it is better to tack on "variables." and make it explicit > for security and readability. Any thoughts? > > Eric > > > ~| 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:344620 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
scoping
We had a discussion at work as to whether or not we should scope local vars with the "variables." scope since that is implied in a cfset. One camp says it is not needed because of the implicit scoping when using cfset...the other camp says it is better to tack on "variables." and make it explicit for security and readability. Any thoughts? Eric ~| 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:344619 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Using CFTHREAD on CF PRO
Instead of going the route of using cfthread, I would suggest that you might looking into using a queue to handle this. There are a lot of queue options out there ( I believe that Railo uses ActiveMQ for a bunch of things internally, don't know about Adobe) but the essential idea is that you push a message onto the queue at the end of your request (onRequestEnd) and then you have an asynchronous worker process that monitors the queue, pulls messages off as they show up and then processes them. If you start seeing a big spike in traffic and need to pull the messages off the queue more quickly, you can increase the number of workers. If time isn't a particularly big issue, you can just let the one worker go and the messages will all be dealt with eventually. Cheers, Judah On Tue, May 17, 2011 at 7:56 AM, Brook Davies wrote: > > Hi Guys, > > > > I am considering spawning a new thread via the onRequestEnd event to do some > post processing. Basically its going to record some stats (a couple quick DB > queries) and possibly send an email based on some criteria. I am considering > CFTHREAD because the user does not need to wait for any results of this > processing. > > > > I've read some things about CFTHREAD being a bottle neck and that CF > Proffesional has limited threads. Would I be asking for trouble trying to do > this? Should I just let the user wait for the processing to finish? It would > really like only be 100-200 milliseconds or so > > > > 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:344618 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfhttp response with non-english characters gets cut off
Thanks for the idea, I hadn't thought of that. A quick test doesn't seem to affect anything. We have a "team-building" exercise the rest of the day, so I'll have to do some more exhaustive testing tomorrow. On Wed, May 18, 2011 at 10:49 AM, Dan G. Switzer, II < dswit...@pengoworks.com> wrote: > > Morgan: > > Have you tried using to the > page with your CFHTTP call? > > -Dan > > On Wed, May 18, 2011 at 11:35 AM, morgan l wrote: > > > > > I'm running into a strange issue here. > > > > CF8: (8,0,1,195765) > > JVM: 1.6.0_16 > > Windows Server 2003 > > > > We're implementing a resume parsing service, posting the resumes to the > > service using cfhttp. All was going well until we ran across a handfull > of > > our test resumes, all with non-English special characters (accented > > characters, Greek letters etc). As far as I can tell, all the characters > > are > > valid utf-8, but the cfhttp call fails with "Connection Failure" in the > > filecontent on all files containing one of these characters. If I remove > > the > > offending character, I get the full results. > > > > I've also tried saving the result to a file (by passing the file and path > > params to cfhttp), but the resulting file is getting cut off--but not at > > the > > offending character, there is plenty of the file content after the > > character. IIS logs indicate that the server is receiving the full byte > > count reported by the response headers. It appears that the content is > > getting cut off somewhere in the JVM or CF processing. Days of google > > searches have turned up no similar experiences, nor any workable > solutions. > > > > If I retool the call to use MSXML as a COM object, the offending files > run > > fine, though they take 20+ seconds longer to process. Such a degradation > in > > performance is obviously unacceptable. > > > > We're at a loss trying to determine what the root cause of this problem > is, > > and the only solution so far increases processing time 10 fold. Has > anyone > > seen anything like this before? I'm open to any ideas on getting a > workable > > solution to this. > > > > > > > > ~| 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:344617 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfhttp response with non-english characters gets cut off
Out of the box, no, I wasn't setting a different encoding, but as a course of trying to find a solution, I did try multiples. Nothing seemed to affect the situation, so I went back to the defaults. I also did play with the getasbinary, but I didn't try 'never'; I actually tried 'yes', thinking I could decode the binary results into a working string. I'll try the 'never' option. On Wed, May 18, 2011 at 10:48 AM, Dave Watts wrote: > > > I'm running into a strange issue here. > > > > CF8: (8,0,1,195765) > > JVM: 1.6.0_16 > > Windows Server 2003 > > > > We're implementing a resume parsing service, posting the resumes to the > > service using cfhttp. All was going well until we ran across a handfull > of > > our test resumes, all with non-English special characters (accented > > characters, Greek letters etc). As far as I can tell, all the characters > are > > valid utf-8, but the cfhttp call fails with "Connection Failure" in the > > filecontent on all files containing one of these characters. If I remove > the > > offending character, I get the full results. > > > > I've also tried saving the result to a file (by passing the file and path > > params to cfhttp), but the resulting file is getting cut off--but not at > the > > offending character, there is plenty of the file content after the > > character. IIS logs indicate that the server is receiving the full byte > > count reported by the response headers. It appears that the content is > > getting cut off somewhere in the JVM or CF processing. Days of google > > searches have turned up no similar experiences, nor any workable > solutions. > > > > If I retool the call to use MSXML as a COM object, the offending files > run > > fine, though they take 20+ seconds longer to process. Such a degradation > in > > performance is obviously unacceptable. > > > > We're at a loss trying to determine what the root cause of this problem > is, > > and the only solution so far increases processing time 10 fold. Has > anyone > > seen anything like this before? I'm open to any ideas on getting a > workable > > solution to this. > > First, you're not specifying a different character set using the > CHARSET attribute of CFHTTP, right? I assume not, just checking. > > Second, you might try fiddling with the GETASBINARY attribute: > http://tjordahl.blogspot.com/2005/09/rss-cfhttp-utf-8-and-cfmx.html > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on > GSA Schedule, and provides the highest caliber vendor-authorized > instruction at our training centers, online, or onsite. > > ~| 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:344616 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfhttp response with non-english characters gets cut off
Morgan: Have you tried using to the page with your CFHTTP call? -Dan On Wed, May 18, 2011 at 11:35 AM, morgan l wrote: > > I'm running into a strange issue here. > > CF8: (8,0,1,195765) > JVM: 1.6.0_16 > Windows Server 2003 > > We're implementing a resume parsing service, posting the resumes to the > service using cfhttp. All was going well until we ran across a handfull of > our test resumes, all with non-English special characters (accented > characters, Greek letters etc). As far as I can tell, all the characters > are > valid utf-8, but the cfhttp call fails with "Connection Failure" in the > filecontent on all files containing one of these characters. If I remove > the > offending character, I get the full results. > > I've also tried saving the result to a file (by passing the file and path > params to cfhttp), but the resulting file is getting cut off--but not at > the > offending character, there is plenty of the file content after the > character. IIS logs indicate that the server is receiving the full byte > count reported by the response headers. It appears that the content is > getting cut off somewhere in the JVM or CF processing. Days of google > searches have turned up no similar experiences, nor any workable solutions. > > If I retool the call to use MSXML as a COM object, the offending files run > fine, though they take 20+ seconds longer to process. Such a degradation in > performance is obviously unacceptable. > > We're at a loss trying to determine what the root cause of this problem is, > and the only solution so far increases processing time 10 fold. Has anyone > seen anything like this before? I'm open to any ideas on getting a workable > solution to this. > > > ~| 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:344615 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfhttp response with non-english characters gets cut off
> I'm running into a strange issue here. > > CF8: (8,0,1,195765) > JVM: 1.6.0_16 > Windows Server 2003 > > We're implementing a resume parsing service, posting the resumes to the > service using cfhttp. All was going well until we ran across a handfull of > our test resumes, all with non-English special characters (accented > characters, Greek letters etc). As far as I can tell, all the characters are > valid utf-8, but the cfhttp call fails with "Connection Failure" in the > filecontent on all files containing one of these characters. If I remove the > offending character, I get the full results. > > I've also tried saving the result to a file (by passing the file and path > params to cfhttp), but the resulting file is getting cut off--but not at the > offending character, there is plenty of the file content after the > character. IIS logs indicate that the server is receiving the full byte > count reported by the response headers. It appears that the content is > getting cut off somewhere in the JVM or CF processing. Days of google > searches have turned up no similar experiences, nor any workable solutions. > > If I retool the call to use MSXML as a COM object, the offending files run > fine, though they take 20+ seconds longer to process. Such a degradation in > performance is obviously unacceptable. > > We're at a loss trying to determine what the root cause of this problem is, > and the only solution so far increases processing time 10 fold. Has anyone > seen anything like this before? I'm open to any ideas on getting a workable > solution to this. First, you're not specifying a different character set using the CHARSET attribute of CFHTTP, right? I assume not, just checking. Second, you might try fiddling with the GETASBINARY attribute: http://tjordahl.blogspot.com/2005/09/rss-cfhttp-utf-8-and-cfmx.html Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| 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:344614 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cfhttp response with non-english characters gets cut off
I'm running into a strange issue here. CF8: (8,0,1,195765) JVM: 1.6.0_16 Windows Server 2003 We're implementing a resume parsing service, posting the resumes to the service using cfhttp. All was going well until we ran across a handfull of our test resumes, all with non-English special characters (accented characters, Greek letters etc). As far as I can tell, all the characters are valid utf-8, but the cfhttp call fails with "Connection Failure" in the filecontent on all files containing one of these characters. If I remove the offending character, I get the full results. I've also tried saving the result to a file (by passing the file and path params to cfhttp), but the resulting file is getting cut off--but not at the offending character, there is plenty of the file content after the character. IIS logs indicate that the server is receiving the full byte count reported by the response headers. It appears that the content is getting cut off somewhere in the JVM or CF processing. Days of google searches have turned up no similar experiences, nor any workable solutions. If I retool the call to use MSXML as a COM object, the offending files run fine, though they take 20+ seconds longer to process. Such a degradation in performance is obviously unacceptable. We're at a loss trying to determine what the root cause of this problem is, and the only solution so far increases processing time 10 fold. Has anyone seen anything like this before? I'm open to any ideas on getting a workable solution to this. ~| 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:344613 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion and AJAX choices
jQuery forever On Tue, May 17, 2011 at 6:09 PM, Michael Grant wrote: > > jQuery + infinity > > > > On Tue, May 17, 2011 at 2:04 PM, Raymond Camden wrote: > > > > > jQuery + 10. ;) > > > > On Tue, May 17, 2011 at 12:56 PM, Carl Von Stetten > > wrote: > > > > > > jquery +1 > > > > > > On 5/17/2011 8:50 AM, Darius Florczyk wrote: > > >> Hi, I need to add AJAX functionality in a new project and wondering if > > anyone had any recommendations for the most robust, stable choice. I will > be > > using it with CF7 but need for it to be easily portable to Railo. The > need > > is to easily load CMS content in to DIV layers depending on the users > > selection and posting of form submits with confirmation alerts. > > >> > > >> So far I was looking at ajaxCFC, Prototype, maAjax, CFAjax, JSMX, > > >> > > >> Any recommendations? > > >> > > >> Thanks > > >> Darius > > >> > > > > > > > > > ~| 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:344612 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: RegEx Question
Here is a very blunt regex that should match the opening tag (does not check for the lack of target="_blank": Here's a great site: http://gskinner.com/RegExr/ On 18 May 2011 02:30, Lists wrote: > > You could actually do this with jquery quite easily should you want to do it > client side. > > $('a[href*=pdf]').click(function(){ > window.open($(this).href); > }) > > > On May 17, 2011, at 5:35 PM, Duane Boudreau wrote: > >> >> Hi All, >> >> First time posting in a very long time. >> >> I'm stuck on a RegEx problem that I can't wrap my head around. I need to >> have a block of html and I need to add target="_blank" to any hyperlink that >> has a pdf link in it. Any suggestions? >> >> Here is the match string I tried so far but I don't think I'm even close. >> >> "]*href=['\\\"]( (?i:)(?:jpg|gif|doc|pdf)$*)" >> >> If anyone can point me in the right direction it would be much appreciated. >> >> TIA, >> Duane >> >> > > ~| 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:344611 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm