Hi everyone!!!
Actually I’m having some problems with the JS API (in conjuntion with accented vowels and other special chars) when I’m reading the content of a .txt file.
My code opens a file that is placed in an Alfresco Space, like:
var file = companyhome.childByNamePath(“NAME OF THE TXT FILE”);
Then I obtain the content as follow:
var content = file.content;
And finally I assign this content as the value of a property of other content that I’ve in the repository, more or less like:
var doc = companyhome.childByNamePath(“NAME OF THE DOC FILE”);
doc.properties[“NAME PROPERTY”] =content;
doc.save();
The problem is that the chars as ‘á’, ‘à’, ‘é’, ’è’,… Are loaded as ‘?’ chars (the non special chars are displayed correctly).
On the other hand if you edit directly the property (from the properties sheet), you can put these special chars with no problem.
Any idea?
Thx.
Xavi