You have at least three options:
// Use a backslash to "mask" the quotation mark
replace('%bucket_fr%', 'construction d\'un petit immeuble');
// Use doulbe quotations marks to define the string
replace('%bucket_fr%', "construction d'un petit immeuble");
// Use the correct character for the apostrophe
replace('%bucket_fr%', 'construction d’un petit immeuble');
By the way: It's the same problem with English...