Re: Does p:data preserve charset value for text content types?

"Toman_Vojtech@emc.com" <Toman_Vojtech@emc.com> writes:
> When answering the "charset with unescape-markup" question, I came
> across the following issue with p:data. What is the expected result of
> the following:
>
> <p:data href="file.txt" content-type="text/plain;charset=windows-1252"/>
>
> Is it (1):
>
> <c:result content-type="text/plain;charset=windows-1252">...</c:result>
>
> Or (2):
>
> <c:result content-type="text/plain">...</c:result>
>
> I am thinking that perhaps (2) (charset information removed) is more
> correct *for text types* because the text has been converted to a
> sequence of Unicode characters and is not in windows-1252 any more. 

For p:http-request, we say explicitly that content-type is the same as
the value of the Content-Type: header (therefore including any
parameters). I think the most consistent thing we can do is say the
same here.

> If you look at the test data-002 in the XProc test suite, it expect the
> charset to be there, but I wonder if it is really correct.
>
> But perhaps this is not a problem at all since the result is not base64
> encoded for text types so the charset information will be (will it?)
> always ignored. Plus you may want to present the original charset in the
> content type.

Right.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | We are afraid of the old age which we
http://nwalsh.com/            | may never attain.--La Bruyère

Received on Thursday, 10 September 2009 11:23:21 UTC