@@ -94,19 +94,19 @@ { OFString *old = username; char *node; Stringprep_rc rc; - if ((rc = stringprep_profile([username_ cString], &node, + if ((rc = stringprep_profile([username_ UTF8String], &node, "SASLprep", 0)) != STRINGPREP_OK) @throw [XMPPStringPrepFailedException newWithClass: isa connection: self profile: @"SASLprep" string: username_]; @try { - username = [[OFString alloc] initWithCString: node]; + username = [[OFString alloc] initWithUTF8String: node]; } @finally { free(node); } [old release]; @@ -121,20 +121,20 @@ { OFString *old = resource; char *res; Stringprep_rc rc; - if ((rc = stringprep_profile([resource_ cString], &res, + if ((rc = stringprep_profile([resource_ UTF8String], &res, "Resourceprep", 0)) != STRINGPREP_OK) @throw [XMPPStringPrepFailedException newWithClass: isa connection: self profile: @"Resourceprep" string: resource_]; @try { - resource = [[OFString alloc] initWithCString: res]; + resource = [[OFString alloc] initWithUTF8String: res]; } @finally { free(res); } [old release]; @@ -149,20 +149,20 @@ { OFString *old = server; char *srv; Idna_rc rc; - if ((rc = idna_to_ascii_8z([server_ cString], + if ((rc = idna_to_ascii_8z([server_ UTF8String], &srv, IDNA_USE_STD3_ASCII_RULES)) != IDNA_SUCCESS) @throw [XMPPIDNATranslationFailedException newWithClass: isa connection: self operation: @"ToASCII" string: server_]; @try { - server = [[OFString alloc] initWithCString: srv]; + server = [[OFString alloc] initWithUTF8String: srv]; } @finally { free(srv); } [old release]; @@ -177,19 +177,19 @@ { OFString *old = domain; char *srv; Stringprep_rc rc; - if ((rc = stringprep_profile([domain_ cString], &srv, + if ((rc = stringprep_profile([domain_ UTF8String], &srv, "Nameprep", 0)) != STRINGPREP_OK) @throw [XMPPStringPrepFailedException newWithClass: isa connection: self profile: @"Nameprep" string: domain_]; @try { - domain = [[OFString alloc] initWithCString: srv]; + domain = [[OFString alloc] initWithUTF8String: srv]; } @finally { free(srv); } [old release]; @@ -204,19 +204,19 @@ { OFString *old = password; char *pass; Stringprep_rc rc; - if ((rc = stringprep_profile([password_ cString], &pass, + if ((rc = stringprep_profile([password_ UTF8String], &pass, "SASLprep", 0)) != STRINGPREP_OK) @throw [XMPPStringPrepFailedException newWithClass: isa connection: self profile: @"SASLprep" string: password_]; @try { - password = [[OFString alloc] initWithCString: pass]; + password = [[OFString alloc] initWithUTF8String: pass]; } @finally { free(pass); } [old release]; @@ -239,21 +239,21 @@ if (server) [sock connectToHost: server port: port]; else { - if ((rc = idna_to_ascii_8z([domain cString], &cDomainToASCII, + if ((rc = idna_to_ascii_8z([domain UTF8String], &cDomainToASCII, IDNA_USE_STD3_ASCII_RULES)) != IDNA_SUCCESS) @throw [XMPPIDNATranslationFailedException newWithClass: isa connection: self operation: @"ToASCII" string: domain]; @try { domainToASCII = [OFString - stringWithCString: cDomainToASCII]; + stringWithUTF8String: cDomainToASCII]; } @finally { free(cDomainToASCII); } @try {