Re: What encodings does Saxon support with unparsed-text()?
Martin Honnen <[email protected]> Thu, 15 Apr 2021 20:22:54 +0200
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
On 15.04.2021 19:58, Roger L Costello wrote: > The Saxon documentation says this about the unparsed-text() function: > > unparsed-text($href as xs:string?, $encoding as xs:string) --> xs:string? > > Arguments > > $href xs:string? The URI of the text file to be read > > $encoding xs:string The encoding to be assumed for the text file > > As I understand it, if the file pointed to by $href is encoded as Windows 1252 and $encoding has the value "Windows-1252", then Saxon will input the Windows-1252-encoded text and convert it to Unicode, right? > > In other words, Saxon takes the input text and uses $encoding to inform Saxon of the text's encoding, and then converts the text to equivalent text that is in a Unicode encoding scheme, right? > > What character encoding schemes does Saxon support? Can Saxon convert Windows 1252 text to Unicode? What else? I would guess that it depends and relies on the underlying Java platform, for Java 8 a list is at https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html