Subject | Re: [Firebird-Java] Re: One Byte Encoders maps unknown chars to 0 instead of '?' |
---|---|
Author | Mark Rotteveel |
Post date | 2009-09-14T16:28:11Z |
Most people here use the mailing list to read (and reply to) messages.
It looks like your original message on the 8th of July never made it to
the mailinglist (at least not in my mailbox) and is only available in
Yahoo archive.
The proper way to get bugs solved is by filing a bug in the
firebird-tracker at http://tracker.firebirdsql.org
I do think it is worth looking how other encoders/decoders handle this,
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. If other encoders handle it
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.
Mark
kaneider_daniel wrote:
Mark Rotteveel
It looks like your original message on the 8th of July never made it to
the mailinglist (at least not in my mailbox) and is only available in
Yahoo archive.
The proper way to get bugs solved is by filing a bug in the
firebird-tracker at http://tracker.firebirdsql.org
I do think it is worth looking how other encoders/decoders handle this,
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. If other encoders handle it
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.
Mark
kaneider_daniel wrote:
> Since we didn't get any replies to our previous post, we would remind--
> that we consider this behavior as a bug. All encoders we know convert
> unknown characters to '?' or similar, but no one maps them to '\0'.
>
> We propose to solve this issue with the following patch in
> Encoding_OneByte.Initialize(String,char[],byte[],char[])
>
> // BEGIN PATCH
> Arrays.fill(charToByte, (byte)'?');
> // END PATCH
Mark Rotteveel