Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, i'm from Belarus, so i have to use russian language in my website. But, to send any variable to prepopulate webform by URL, i can't use cyrillic characters becouse..
After send for example "тест" as variable, it's transformed to "%F2%E5%F1%F2" and not accepted by $_get function of webform.
how can i fix it? How integrate iconv to this module? Please, help! and sorry for my english.
Comments
Comment #1
quicksketchI think that you're just not encoding your query string correctly.
If I attempt to encode "тест" its actual encoding is
%D1%82%D0%B5%D1%81%D1%82
when using urlencode(). See http://php.net/urlencode. I'm not sure where "%F2%E5%F1%F2" would come from.When doing this, the characters are properly decoded and inserted into textfields as "тест".
Your English is superb. :-)
Comment #2
dgastudio CreditAttribution: dgastudio commentedthanks for your answer!
but i need to send variable through url, so for example test.com/index.php?variable=проверка is always transformed to test.com/index.php?variable=%EF%F0%EE%E2%E5%F0%EA%E0 by BROWSER.
so i can't encode it via php or any other thing.
but i found that in VIEWS i can send variables (arguments) as: test.com/views_view/переменная and it's working correctly.
i don't know if this is a bug o correct benaviour of browser.
thanks
Comment #3
quicksketchCould you explain where your links are coming from? Wherever the links are being printed out, that's where you need to change it.
Comment #4
dgastudio CreditAttribution: dgastudio commentedok, i have 2 websites.
on the first, made with custom CMS, i have a simple list of my partners. To each partner i want to add icon (leave a comment about this partner). After press this icon, through something like lightbox i show a window with Webform (from my second website, Drupal) fields: partner, your name, phone, comment. And i want to populate field Partner with correct value from website 1. I know how to do it with links and $partner=тест.
The problem is becouse all my partners companys title are in russian
So the story is
Website 1.
partner list -> click leave a comment-> link = drupalsite.com/node/add/webform?partner=тест --> webform from 2nd website.
but after make click, partner title ТЕСТ из transformed to %D2%C5%D1%D2 and the field PARTNER in webform isn't prepopulated.
u understand?
Comment #5
dgastudio CreditAttribution: dgastudio commentedand for better example:
http://dev.alutech.ru/partner/feedback?partner=test
http://dev.alutech.ru/partner/feedback?partner=тест
understand the difference?
Comment #6
quicksketchGotcha. Then what you need to do is encode the URL when the link is printed out:
<?php print 'http://dev.alutech.ru/partner/feedback?partner=' . urlencode('тест'); ?>
Comment #7
dgastudio CreditAttribution: dgastudio commentedi'll try! thank u very much!
Comment #8
dgastudio CreditAttribution: dgastudio commentedit's works! thank u very much!