AnsweredAssumed Answered

JCR and escaping apostrophes

Question asked by hiteshlad on May 30, 2007
Latest reply on Jun 25, 2007 by nikkijuk
Hi,
We're using Alfresco Community 2.0.0 in our custom webapp over JCR/JNDI.  This has worked well for us so far.  One problem we noticed though on our production server is apostrophe (aka single quotes) are replaced with question marks in some of the fields.  I'm just setting them as standard JCR properties.  For example, here is one instance i see in the node browser:
Name: {http://www.company.com/devcenter/model}description   
Value: The Company Project Father?s Day Media Campaign
Type: {http://www.alfresco.org/model/dictionary/1.0}text

Name: {http://www.company.com/devcenter/model}nameExternal   
Value: Father?s Day Media Campaign
Type: {http://www.alfresco.org/model/dictionary/1.0}text
That is, the nameExternal and description should read Father's Day, not Father?s Day.  I know that the JCR property with normal single quotes that the user put in.  That code looks like:
oNode.setProperty(NodeConstants.PROPERTY_NAME_EXTERNAL, sNodeName);
oNode.setProperty(NodeConstants.PROPERTY_DESCRIPTION, sDescription);
Now this is happening on my production RedHat Enterprise Linux 4 server with MySql 5.0, but not on my test RHEL4 server with MySql 4.1 nor my dev Windows XP with MySql 5.0.

Anybody else see this type of problem?

- hitesh

Outcomes