nsAString::const_iterator source_start, source_end; CalculateUTF8Size calculator; copy_string(aSource.BeginReading(source_start), aSource.EndReading(source_end), calculator);
AppendUTF16toUTF8( const nsAString& aSource, nsACString& aDest )  {    // This isn't the fastest possible implementation of this method,    // but it works, and that's better than nothing!    aDest.Append(NS_ConvertUCS2toUTF8(aSource));  }