Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#866 Extended character sets under .NET

v9.1
closed
Michael Kay
.NET API (34)
5
2012-10-08
2008-09-02
Michael Kay
No

The Saxon serializer on .NET does not recognize character sets such as Big5 or shift_jis (for use in xsl:output and similar interfaces) - specifically, those character sets whose support in OpenJDK is not in the main class library JAR file, but in the separate charsets.jar archive.

This will be fixed in a maintenance release (9.1.0.2). The fix is as follows:

(a) charsets.jar is cross-compiled into charsets.dll using IKVMC, and this DLL is issued with the product

(b) the zero-argument constructors in Transform.cs and Query.cs have the line

GC.KeepAlive(typeof(sun.nio.cs.ext.ExtendedCharsets));

added to them

(c) if Saxon is called from a user-written application, rather than from the command line, then the .exe should also include this line (assuming the extended character sets are needed, of course)

(d) charsets.dll is strong-named and placed in the GAC

(e) Transform.cs and Query.cs are compiled with a reference to charsets.dll (and user applications should do likewise)

There is no change to the Saxon library DLLs. (I tried adding the reference to charsets.dll to saxon9.dll but this was unsuccessful. It must be possible somehow, but this solution will do for now).

Discussion

  • Michael Kay
    Michael Kay
    2008-09-02

    Logged In: YES
    user_id=251681
    Originator: YES

    Fixed in 9.1.0.2