Tree - Data Processor

Hello,



i am using the tree component with data processor in version v20. I want to implement, that the user is being able to edit nodes.

So i coded:





tree.enableItemEditor(true);



dataProcessor = new dataProcessor(“update.do”);

dataProcessor.enableUTFencoding(true);





If the user changes the nodetext using german umlauts like ‘Geh�use’, i will get in the Update handler the following values

for tr_text:

� ->A*

�->APar.

�->A1/4

�->A#

�->A#

�->A#

�->A#



What’s going wrong here? I am not able to distignuish between �,�,� and � :frowning:.



Best regards,

Stefan Riedel-Seifert



Which encoding you are using for the page and server side script?
The enableUTFencoding command force usage of encodeURIComponent for data transfer ( so umlauts replaced with correct multi-byte utf sequences ) and if your server side code process data as iso-8859-1 encoded - it may cause such problem.

You can try to change code to
dataProcessor.enableUTFencoding(false);
in such case client side data will be encoded by “escape” which preserve current encoding ( if you are using iso-8859-1 as page encoding - umlauts will be sent to server side as is )


Hello,



 



for first, thank you for your quick response. My environmant is a SAP Netwaver 7.01 Server with Abap runtime.  There is no specific page encoding available, but thes olution is as you mentionied. I must explizit set:




dataProcessor.enableUTFencoding(false);



leave them away is not sufficient enough!



 



Remark for the other readers: in the original question above i mentioned the german umlauts like ä,ü,ö,Ä,Ü,Ö :slight_smile:.



 



Thank you very much,



Stefan Riedel-Seifert

Please try one more approach

Use dataprocessor with
dataProcessor.enableUTFencoding(true);
and version of dhtmlxcommon.js from next post
dhtmlx.com/docs/products/kb/inde … mmon%20utf
instead of original one, it will add special headers to the sent data, to inform server side code about used encoding.



Hello Support,



i’ve tried your last hint, but it’s no solution in my case. It behave now as in the beginning :slight_smile:.



But the new coomon.js works also fine.



Best regards,



Stefan Riedel-Seifert

Is the same data submitted through normal works with your server side code?

Yes, that works fine :slight_smile: