Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

setting Marshaller CharacterEncodingHandler with utf-8 does not work #617

Closed
@glassfishrobot

Description

@glassfishrobot

when calling
marshaller.setProperty(CharacterEscapeHandler.class.getName(), new
CustomCharactertEscapeHandler());

this handler will be ignored during marshalling when
marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); will be used.

I checked the source-code of MarshallerImpl and the XMLWriter created internally for UTF-Encoding
simply ignores users CharacterEscapeHandler.

by running the chracter-escape-sample from the binary-download you can verify this behavior, when
you change the encoding from US-ASCII to UTF-8.

tim

Environment

Operating System: Mac OS X
Platform: Macintosh

Affected Versions

[2.1.9]

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions