jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paco Avila <pav...@git.es>
Subject Re: repository portability
Date Wed, 06 Dec 2006 18:40:50 GMT
El mié, 06-12-2006 a las 14:44 +0100, Tobias Bocanegra escribió:
> well, your problem is not jackrabbit related, rather to the default
> platform encoding for your system:
> 
> you read/write the data, using the default encoding:
> 
> nodoPruebaName.getBytes()
> 
> which is not platform independent. it's better to use:
> 
> nodoPruebaName.getBytes("utf-8")
> 
> or even better, use the same encoding you store in the jcr:encoding property.
> regards, toby

Thanks to Tobias & Julian, now it works.

But I have a last question... The JSR-170 says: "The jcr:encoding
indicates the character set encoding used. If this resource does not
contains character data then this property will not be present". I'm not
sure about the meaning of this paragraph: in the test program I store
String in the nt:resource node and should have this property because of
encoding issues. But what about storing binary data like an JPG image?
It this property ignored or it shouldn't be present? Should be used only
when the jcr:mimeType property is "text/*"?
-- 
Paco Avila <pavila@git.es>


Mime
View raw message