twhite3000 / vqmod

Automatically exported from code.google.com/p/vqmod
0 stars 0 forks source link

Vqmod seems doesn't support russian language #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put a russian word inside <search> or <add>, for example - Работает
2. If you are trying to use russian CP1251 for xml file you'll get "DOM UNABLE 
TO LOAD" even if syntax was correct
3. If you are trying to use UTF8 for xml file, then it's working but you'll get 
"SEARCH NOT FOUND (ABORTING MOD): Работает"

So i hadn't found the way to make mod working with russian language until now.

vQmod Version: 2.1.7
Server Operating System: windows 7 / linux

Please provide any additional information below.

Original issue reported on code.google.com by mikka...@gmail.com on 6 Sep 2012 at 1:03

GoogleCodeExporter commented 9 years ago
Do you use <![CDATA[ ]]> tags ?

Original comment by DJG6...@gmail.com on 6 Sep 2012 at 1:11

GoogleCodeExporter commented 9 years ago
Yes, of course... Code looks like this:

        <operation>
            <search position="after"><![CDATA[$_['text_account']      = 'Личный Кабинет';]]></search>
            <add><![CDATA[$_['text_login']        = 'Вход';]]></add>
        </operation>

Original comment by mikka...@gmail.com on 6 Sep 2012 at 1:54

GoogleCodeExporter commented 9 years ago
Have you got the character encoding at the top of your xml file?
<?xml version="1.0" encoding="UTF-8"?>

Original comment by DJG6...@gmail.com on 6 Sep 2012 at 2:22

GoogleCodeExporter commented 9 years ago
Nope, before i haven't, but i tried to put it in... Same result...

Original comment by mikka...@gmail.com on 6 Sep 2012 at 3:44

GoogleCodeExporter commented 9 years ago
I tried it with the text you have above. There was no error and the file loaded 
fine. Remove those lines - does the error still occur?

Original comment by DJG6...@gmail.com on 6 Sep 2012 at 3:50

GoogleCodeExporter commented 9 years ago

Original comment by DJG6...@gmail.com on 6 Sep 2012 at 4:06

GoogleCodeExporter commented 9 years ago
Yep, that thing above is working, but i also tested the other one and for:

    <search position="after"><![CDATA[Работает на]]></search>

there is no problem and everything working good, but if i'll do search like this

    <search position="after"><![CDATA[$_['text_powered'] = 'Работает на]]></search>

it's giving 
SEARCH NOT FOUND (ABORTING MOD): $_['text_powered']= 
'Работает на

:\

Original comment by mikka...@gmail.com on 6 Sep 2012 at 5:15

GoogleCodeExporter commented 9 years ago
Interesting. OK, Open your /vqmod/vqmod.php file, find
strpos
and change it to
mb_strpos

Does that fix it?

Original comment by DJG6...@gmail.com on 6 Sep 2012 at 7:33