help-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UTF8 encoded object is becoming nil


From: Kotesh
Subject: UTF8 encoded object is becoming nil
Date: Thu, 20 Sep 2001 16:28:46 +0530

Hi,
 
The folowing program running on Solaris2.8 is producing 'nil' output after encoding the String to UFT8...
 
GNUstep is fully configured with libiconv and Unicode.m file has been modified to accomodate UCS-2 encoding..
 
FYI: The same program is working fine on NT/webojects3.5
 
#import <Foundation/Foundation.h>

int main (int argc, const char *argv[]){

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

NSString *aString = @"Hello---@˜pP-l¦&ä¦";

NSString *bString = nil;

NSData *stringData;

NSLog(@"the Initial String = %@",aString);

stringData = [aString dataUsingEncoding: NSUTF8StringEncoding];

NSLog(@"the Second data = "">

bString = [[NSString alloc] initWithData:stringData encoding:NSUTF8StringEncoding];

NSLog(@"the Third String = %@",bString);

[pool release];

exit(0);

}

Any help in overcoming the problem is greatly appreciated..

 

Thanks

kotesh


reply via email to

[Prev in Thread] Current Thread [Next in Thread]