@@ -2339,15 +2339,18 @@ #if defined(HAVE_STRTOF_L) || defined(HAVE_USELOCALE) const char *UTF8String = self.UTF8String; #else /* - * If we have no strtof_l, we have no other choice but to replace "." - * with the locale's decimal point. + * If we have no strtof_l, we have no other choice than to replace the + * locale's decimal point with something that will be rejected and + * replacing "." with the locale's decimal point. */ OFString *decimalSeparator = [OFLocale decimalSeparator]; - const char *UTF8String = [self + const char *UTF8String = [[self + stringByReplacingOccurrencesOfString: decimalSeparator + withString: @"!"] stringByReplacingOccurrencesOfString: @"." withString: decimalSeparator].UTF8String; #endif char *endPtr = NULL; float value; @@ -2396,15 +2399,18 @@ #if defined(HAVE_STRTOD_L) || defined(HAVE_USELOCALE) const char *UTF8String = self.UTF8String; #else /* - * If we have no strtod_l, we have no other choice but to replace "." - * with the locale's decimal point. + * If we have no strtod_l, we have no other choice than to replace the + * locale's decimal point with something that will be rejected and + * replacing "." with the locale's decimal point. */ OFString *decimalSeparator = [OFLocale decimalSeparator]; - const char *UTF8String = [self + const char *UTF8String = [[self + stringByReplacingOccurrencesOfString: decimalSeparator + withString: @"!"] stringByReplacingOccurrencesOfString: @"." withString: decimalSeparator].UTF8String; #endif char *endPtr = NULL; double value;