jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: repository portability
Date Wed, 06 Dec 2006 14:31:39 GMT
Tobias Bocanegra schrieb:
> 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


Using the system default encoding in getBytes() (and related IO methods) 
almost always is a potential bug.

In doubt, always use UTF-8 (and, as Tobias said), make sure that the 
encoding property reflects the actual content encoding.

Best regards, Julian

View raw message