Hi,

I just implemented this by defaulting to US-ASCII in both cases but allowing 
you to overide it via the constructors. However I would prefer to default to 
the default encoding for the StreamTarget - does anyone know how to find out 
what the default character encoding is?

On Mon, 24 Feb 2003 22:50, [EMAIL PROTECTED] wrote:
> Hey folks,
>
> Just tried to incorporate logkit into a Websphere project that is running
> on an OS390.
> When using the DatagramOutputTarget and the syslog formatter, my syslog
> server
> would receive that logging packet but not record it. I had to change the
> following:
>
>     protected void write( final String stringData )
>     {
>       try
>       {
>               final byte[] data = stringData.getBytes("US-ASCII");
>
>               try
>               {
>                   final DatagramPacket packet = new DatagramPacket( data,
> data.length );
>                   m_socket.send( packet );
>               }
>               catch( final IOException ioe )
>               {
>                   getErrorHandler().error( "Error sending datagram.", ioe,
> null );
>               }
>           }
>           catch ( Exception ioe )
>           {
>               getErrorHandler().error( "Error sending datagram.", ioe,
> null );
>           }
>       }
>
> Probably not the best solution but works. I ran into this same assumption
> on the FOP project.
>
> I noticed that StreamTarget write() method has a getBytes as well.
>
> Did I miss any type of encoding setup anywhere or can something like that
> be added to a future release?
>
> Thanks, Jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Cheers,

Peter Donald
--------------------------------------------------
"An intellectual is someone who has been educated 
beyond their intelligence."
-------------------------------------------------- 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to