'path' in array with special characters using imagecache I have a folder in my sites/default/files directory filled with product jpg's gathered from an external server and back end stock take system.

The files look like this...


Bread.jpg 
Bakery.jpg 
Cakes+and+Puddings.jpg 
Chocolate+Bars.jpg
Chocolates+%26+Treats.jpg
Christmas+Fruit+%26+Veg.jpg


I am using theme_image_style in a custom block template to print the images using an image style from Drupal 7's core image handler like so...

&lt;?php
    print theme_image_style(
        array(
            'style_name' =&gt; 'category_header', 
            'path' =&gt; 'product_group_images/' . $productcategoryurl . '.jpg',  
            'attributes' =&gt; array(
            'class' =&gt; 'category-header-image'
                 ),
            'width' =&gt; NULL, 
            'height' =&gt; NULL,
        )
    );

?&gt;


Where $productcategoryurl is the image name inside the product_group_images folder.

This all works great where the image is only one word, like bread.jpg or bakery.jpg

The trouble I am having is the "+" or "&amp;" (%26) in the image names.

I have tried str_replace to swap the spaces in the product name with "+", but in the path, the "+" is always encoded, and the image is never saved in the new style.

So my path comes out like.... 


/sites/default/files/product_group_images/Chocolate%2BBars.jpg


Instead of...


/sites/default/files/product_group_images/Chocolate+Bars.jpg


And therefore, no image is created in the /sites/all/files/styles directory.

Is there a way using the "path" in the array to actually use the "+" as a space without encoding it?

I hope ive explained that well enough, its late!
I would use a hyphen "-" instead of plus "+" as it is URL safe and the standard MO on Drupal