212
I Use This!
Very Low Activity

News

Analyzed about 19 hours ago. based on code collected about 20 hours ago.
Posted about 13 years ago by samran
wellnessdd
Posted about 13 years ago by Brett Zamir
@John Supplee, @Josep Sanz, @Luke Scott: The ut8_decode was removed in Git. We should indeed be following PHP and UTF8-friendly behavior. @Chris Buckley: Fixed comments in Git. @Yaffle: I see PHP also doesn't depend on the padding (though the MIME ... [More] (RFC2045) per Wikipedia requires the padding), so I guess we should add support. I will see whether I have time later. [Less]
Posted about 13 years ago by Brett Zamir
@ekim: No, var_export in php.js currently does not support recursive references (or flag them as errors). Feel free to add support! @Hans Henrik: We cannot use JSON.stringify for a few reasons: 1) JSON doesn't allow functions; JSON is only a subset ... [More] of JavaScript intended for safely conveying data across platform. 2) JSON methods are not supported in older browsers. 3) PHP's var_export detects other properties like resources as do we (in our own way, even though JS does not have resource types). As far as your point about the 2nd argument, I have fixed it in Git (along with fixing some JSLint issues). Thanks! [Less]
Posted about 13 years ago by Brett Zamir
@Chris: I have applied your fix to Git. Thanks!
Posted about 13 years ago by Brett Zamir
@Igor Tykhyy: (I should have mentioned that the notes to the function also mention this.)
Posted about 13 years ago by Brett Zamir
@Edward: I have made fixes in Git (also for unpack() which is in the workbench). Please check "raw js source". @Igor Tykhyy: I am just trying to give a quick answer now, but it looks like each character is examined in the data, with its Unicode ... [More] value utilized, whereas in PHP, each byte is treated as a separate character. You might try toying around with the references to "fromCharCode" (or "charCodeAt" in unpack()) and instead use what I just posted to http://phpjs.org/functions/361:361#comment_179265 for another purpose: function bin2hex (s) { return encodeURIComponent(s+'').replace(/%/g, '').toLowerCase(); } This will convert a non-separated string of hex values for each UTF-8 byte. You may be able to adapt this for your needs. [Less]
Posted about 13 years ago by Brett Zamir
@Rajiva: In addition to my last question, what browser were you using?
Posted about 13 years ago by Brett Zamir
@Rajiva: Can you put your long sequence somewhere so we can confirm? I am not able to replicate with decodeURIComponent() (which would be giving the URI error) even with a very large sequence: var arr = decodeURIComponent(new Array(101000).join('%20'));
Posted about 13 years ago by Brett Zamir
@Oscar Broman: Can you integrate at least as comprehensive argument checking as we have in our existing version, following PHP behavior without losing the performance benefits of your new version?
Posted about 13 years ago by Brett Zamir
@Michal: Thanks--If you have any way to shorten the existing function, without losing support for all the existing arguments and functionality, let us know.