Subject | Re: [Firebird-Java] Re: One Byte Encoders maps unknown chars to 0 instead of '?' |
---|---|
Author | Roman Rokytskyy |
Post date | 2009-09-14T18:09:28Z |
> I do think it is worth looking how other encoders/decoders handle this,The issue with '?' vs 0x00 is that if that 0x00 is written to some
> because replacing an unprintable or unknown character with a '?' is in
> my eyes a presentation decision that should NOT be handled by an
> encoder, but only by the presentation layer.
external storage, other application written not in Java might use the
0x00 symbol as end-of-string marker. Whether it is '?' or something else
is rather irrelevant, only that '?' is a symbol that is usually used in
such conversions.
> If other encoders handle itIt was the initial implementation, but one of our developers (long time
> like this as well (eg the built in CharSet objects in Java), we should
> follow. On that note, I do think it would be better if Jaybird would
> defer to the standard Java encoders or the Java ICU implementation
> instead of using handrolled encoders.
ago) have measured about 5% performance increase when using our
handwritten encoders. That might be no longer right, so returning back
to standard Java encoders is an option.
Roman