<div dir="ltr"><div>Thanks for the response. First I tried to 'reset' the variables, but without purging QGIS configs (~/.config/QGIS folder). Since there is no 'delete global variable' method in QGIS 2 API I just set all of the variables I use to an empty string at the beginning of my code. This seems to work for now (at least on OS that it hadn't before), but if it turns out it's not the case, my next try will be string escaping.<br></div>Best regards<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><b><font color="#333333">Adam Borczyk</font></b></div><div><font color="#333333"><br></font><div dir="ltr"><div><b>---------------------------------</b></div>
<div><font color="#666666"><b>GIS Support Sp. z o.o.</b></font></div><div><font color="#666666"><a href="https://maps.google.com/?q=Dobrza%C5%84skiego+3,%C2%A0Lublin+20-262&entry=gmail&source=g" target="_blank">Dobrzańskiego 3, </a></font><span style="color:rgb(102,102,102)"><a href="https://maps.google.com/?q=Dobrza%C5%84skiego+3,%C2%A0Lublin+20-262&entry=gmail&source=g" target="_blank">Lublin 20-262</a></span></div><div><span style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">tel. 814511490, </span>NIP: 9462641761,</span><span style="color:rgb(102,102,102)"></span></div>
<div><font color="#666666"><u><a href="http://www.gis-support.pl" target="_blank">www.gis-support.pl</a></u> <br><a href="mailto:info@gis-support.pl" style="text-decoration:underline" target="_blank">info@gis-support.pl</a></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 10 April 2018 at 02:10, Nyall Dawson <span dir="ltr"><<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10 April 2018 at 04:47, Adam Borczyk <<a href="mailto:adam.borczyk@gis-support.pl">adam.borczyk@gis-support.pl</a>> wrote:<br>
> Hello everyone,<br>
><br>
> I'm developing a plugin under QGIS 2 environment in which I use global<br>
> variables. I'd like to know if it's allowed to pass a JSON string into a<br>
> global variable?<br>
><br>
> My globals were fine until (I guess) I started to pass in jsons and now I<br>
> face an issue I described here:<br>
> <a href="https://gis.stackexchange.com/questions/277623/global-variables-in-qgis-mixed-on-some-computers" rel="noreferrer" target="_blank">https://gis.stackexchange.com/<wbr>questions/277623/global-<wbr>variables-in-qgis-mixed-on-<wbr>some-computers</a><br>
> - basically the assignment of values to variables is sometimes wrong, some<br>
> even stay empty sometimes and it feels to be totally random.<br>
><br>
> If anyone knows if jsons could introduce any error in globals, I would be<br>
> grateful and it would narrow down my search. I don't know how are they<br>
> parsed, so maybe OS regional settings (commas and colons thing) also come<br>
> into play? Regards QGIS 2.18 and it's subversions (5, 9, 13, 18 etc.).<br>
<br>
</span>Possibly - the guts of this are buried deep within the Qt library, but<br>
I'd be surprised to find if it's not correctly escaping the strings.<br>
I'd suggest manually escaping/unescaping them and see if that helps.<br>
<br>
You'll probably need to remove any existing variable settings keys to<br>
test properly.<br>
<br>
Nyall<br>
<br>
<br>
<br>
><br>
> Best regards<br>
><br>
> Adam Borczyk<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
</blockquote></div><br></div>