somatt
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Accented characters in checkboxI think the problem was due to a bug in php 5.3.4 on windows. Since my last post I noticed some toher places where the “à” character was not handled right. Upgrading to 5.3.8 fixed it.
Just though you might wanna know about that.Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Accented characters in checkboxI think the “u” modifier doesn’t only treat the pattern as UTF-8, but considers the target string as UTF-8 encoded too. That’s how I’ve always been using it, and I’m a bit surprised by rereading the doc to find out it’s not really what it says.
Anyway, without it, some characters like “à” are replaced with the ? in a diamond, while with it the string is only altered on whitespaces, and other characters are not altered, which is what we’re aiming for here.
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Accented characters in checkboxI eventually found out the source of the problem…
In contact-form-7/includes/shortcodes.php, line 39 (within function normalize_space_cb), there is a preg_replace that doesn’t handle unicode.
Replacing
$attr = trim( preg_replace( ‘/\s+/’, ‘ ‘, $m[3] ) );
with
$attr = trim( preg_replace( ‘/\s+/u’, ‘ ‘, $m[3] ) );
solves the problem !I hope you can fix this in the source for everyone to benefit from it 🙂
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Accented characters in checkboxI’m glad it works for you, but unfortunately here it doesn’t 🙁
with [checkbox my-choices use_label_element “ràgion1” “région2”] I only get the br tag and no other markup.
I’m using Version 3.0.1 of the plugin and Version 3.2.1 of wordpress.Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Accented characters in checkboxWell, it works with “région” but not with “ràgion”