      }
  
    OCIHandleFree(_current_stm, OCI_HTYPE_STMT);
-@@ -138,6 +141,14 @@
- 	{
- 	  NSLog(@"FAILED: OCITerminate()");
+@@ -75,6 +78,30 @@
+ //
+ @implementation OracleAdaptorChannel
+ 
++static void
++DBTerminate()
++{
++  if (OCITerminate(OCI_DEFAULT))
++    NSLog(@"FAILED: OCITerminate()");
++  else
++    NSLog(@"Oracle8: environment shut down");
++}
++
+++ (void) initialize
++{
++  // We Initialize the OCI process environment.
++  if (OCIInitialize((ub4)OCI_DEFAULT, (dvoid *)0,
++                    (dvoid * (*)(dvoid *, size_t)) 0,
++                    (dvoid * (*)(dvoid *, dvoid *, size_t))0,
++                    (void (*)(dvoid *, dvoid *)) 0 ))
++    NSLog(@"FAILED: OCIInitialize()");
++  else
++    {
++      NSLog(@"Oracle8: environment initialized");
++      atexit(DBTerminate);
++    }
++}
++
+ - (id) initWithAdaptorContext: (EOAdaptorContext *) theAdaptorContext
+ {
+   if ((self = [super initWithAdaptorContext: theAdaptorContext]))
+@@ -134,10 +161,14 @@
+ 	  NSLog(@"FAILED: OCILogoff()");
  	}
+ 
+-      if (OCITerminate(OCI_DEFAULT))
+-	{
+-	  NSLog(@"FAILED: OCITerminate()");
+-	}
 +
 +      OCIHandleFree(_oci_ctx, OCI_HTYPE_SVCCTX);
 +      OCIHandleFree(_oci_err, OCI_HTYPE_ERROR);

   RELEASE(delegate);
 
   [super dealloc];
Index: sope-gdl1/Oracle8/OracleAdaptorChannelController.m
===================================================================
--- sope-gdl1/Oracle8/OracleAdaptorChannelController.m	(rvision 1546)

 - (NSException *)exceptionForFailedMatch:(unsigned char)_match
   got:(unsigned char)_avail
 {
Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m
===================================================================
--- sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m	(rvision 1546)
+++ sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m	(copie de travail)
@@ -285,24 +285,16 @@
 - (id)parseValue:(id)_data ofHeaderField:(NSString *)_field {
   // TODO: use UNICODE
   NSCalendarDate *date       = nil;
-  unsigned char  buf[256];
-  unsigned char  *bytes = buf, *pe;
+  unsigned char  *bytes, *pe;
   unsigned       length = 0;
   NSTimeZone     *tz = nil;
   char  dayOfMonth, monthOfYear, hour, minute, second;
   short year;
   BOOL  flag;
-  
-  if ((length = [_data cStringLength]) > 254) {
-    [self logWithFormat:
-	    @"header field value to large for date parsing: '%@'(%i)",
-	    _data, length];
-    length = 254;
-  }
-  
-  [_data getCString:(char *)buf maxLength:length];
-  buf[length] = '\0';
-  
+
+  length = [_data length];
+  bytes = [_data cStringUsingEncoding: NSASCIIStringEncoding];
+
   /* remove leading chars (skip to first digit, the day of the month) */
   while (length > 0 && (!isdigit(*bytes))) {
     bytes++;
Index: sope-mime/NGMime/NGMimeBodyPart.m
===================================================================
--- sope-mime/NGMime/NGMimeBodyPart.m	(rvision 1546)
