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

quicksketch’s picture

I 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. :-)

dgastudio’s picture

thanks 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

quicksketch’s picture

Could you explain where your links are coming from? Wherever the links are being printed out, that's where you need to change it.

dgastudio’s picture

ok, 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?

dgastudio’s picture

quicksketch’s picture

Gotcha. 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('тест'); ?>

dgastudio’s picture

Status: Active » Postponed

i'll try! thank u very much!

dgastudio’s picture

Status: Postponed » Fixed

it's works! thank u very much!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.