• I came across a bug(?) in this function. I'm using it in my proc to decode the base64 encoded string. My string is this:

    'This is a really long sentence to see how this thing will crash or if it even will crash I am now at 152 letters and still conting'.

    It get encoded via an Actionscript function to this:

    'VGhpcyBpcyBhIHJlYWxseSBsb25nIHNlbnRlbmNlIHRvIHNlZSBob3cgdGhpcyB0aGluZyB3aWxs

    IGNyYXNoIG9yIGlmIGl0IGV2ZW4gd2lsbCBjcmFzaCBJIGFtIG5vdyBhdCAxNTIgbGV0dGVycyBh

    bmQgc3RpbGwgY29udGluZy4='

    What the proc sees is this:

    This is a really long sentence to see how this thing willò7&6‚÷"–b—BWfVâv–ÆÂ7&6‚’Òæ÷rBS"ÆWGFW'2P¿nd still conting.

    For some reason the function bombs at around the 59th place in the string but then picks back up later. Any ideas why? The column is defined as varchar(500) so no insert/update problems there.

    Thanks.