[daisy] [JIRA] Commented: (DSY-474) Rich text content doesn't
transfer properly through the Java api (extended ascii)
Mike McLean (JIRA)
issues at cocoondev.org
Thu May 24 07:26:20 CDT 2007
[ http://issues.cocoondev.org//browse/DSY-474?page=comments#action_13177 ]
Mike McLean commented on DSY-474:
---------------------------------
Thanks Bruno. Obviously, that worked like a charm. Sorry for the trouble.
> Rich text content doesn't transfer properly through the Java api (extended ascii)
> ---------------------------------------------------------------------------------
>
> Key: DSY-474
> URL: http://issues.cocoondev.org//browse/DSY-474
> Project: Daisy
> Type: Bug
> Components: Repository
> Versions: 2.0.1
> Reporter: Mike McLean
> Priority: Minor
>
> To reproduce:
> 1) Starting from a new document type that includes a SimpleDocumentContent part type, create a new document (in my case, using a French variant) and enter extended ascii characters (i.e.: "Un numéro de carte de crédit"). Save and publish
> 2) From the Java api, get a handle on the part and create a string from the content:
> String body = new String(part.getData());
> OR
>
> InputStream in = part.getDataStream();
> StringBuffer out = new StringBuffer();
> byte[] b = new byte[4096];
> for (int n; (n = in.read(b)) != -1;) {
> out.append(new String(b, 0, n));
> }
> Both strings will yield the following: Un numéro de carte de crédit
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the daisy
mailing list