Hi

The characters should be converted to UTF-8 encoding for representation in the 
stream. If you create a Reader on-top of the stream, you would have to declare 
using UTF-8 do properly decode the bytes into characters.

Hope this helps.

Regards
Felix


Am 01.04.2013 um 15:44 schrieb Dimitar Dimitrov:

> Hello everyone.
> Is there anyone who has faced the problem with the Cyrillic support in 
> Apache Sling.
> When I put some string as a property value by the JCR Explorer, and then 
> get this node back in SystemView or DocumentView format I received  
> unreadable characters.
> By debugging I saw that when I use
> 
> nextNode.getSession().exportSystemView(nextNode.getPath(), 
> nodeByteArrayOutputStream, false, noRecursive);
> 
> nodeByteArrayOutputStream which is implementation of 
> ByteArrayOutputStream, has filled with one byte characters for the Latin 
> symbols and four bytes characters for the Cyrillic.
> At first I had not noticed that, so I tried some native methods to 
> convert the whole stream into the correct format, but unsuccessfully.
> Then I start to look more precisely into the ByteArray and catch that 
> the cyrillic strings has four bytes.
> The same can be seen in the JCR Explorer also if you try to enter the 
> cyrillic characters as a property value.
> 
> Thanks in advance.
> Dimitar
> 
> 


--
Felix Meschberger | Principal Scientist | Adobe







Reply via email to