Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Feb 14, 2007 16:16
open dhtmlx forum
Does the tree support UTF-8 encoding?  The reason I ask is because my project requires storing Chinese c...

Does the tree support UTF-8 encoding?  The reason I ask is because my project requires storing Chinese character encoded in UTF-8.  I’ve tried to save Chinese character in “userdata” but shows gibberish in later retrieval.  I’m expecting it to show \uxxxx for each character in my output text file. 
Answer posted on Feb 14, 2007 16:17

The dhtmlxTree is a pure html component so it must work with any browser encoding. To work correctly with UTF you need to do next:

a) Set page encoding to UTF

b) Be sure that XML has correct header

            <?xml version='1.0' encoding='utf-8'?>

c) Enable utf escaping

            tree.setEscapingMode("utf8");

Answer posted by radyno (Support) on Dec 01, 2014 18:25

Having solved the problem mentioned above, you may also look through the possible related problems with datagrid component and building a javascript library.