NS_IMETHODIMP nsRenderingContextPh :: DrawString(const PRUnichar *aString, PRUint32 aLength, nscoord aX, nscoord aY, PRInt32 aFontID, const nscoord* aSpacing) { const int BUFFER_SIZE = (aLength * 3); char buffer[BUFFER_SIZE]; int len;  len = wcstombs(buffer, (wchar_t *) aString, BUFFER_SIZE); return DrawString( (char *) buffer, aLength, aX, aY, aSpacing); }
NS_IMETHODIMP DrawString(const PRUnichar *aString, PRUint32 aLength, nscoord aX, nscoord aY, PRInt32 aFontID, const nscoord* aSpacing) { NS_ConvertUCS2toUTF8 theUnicodeString( aString, aLength ); const char *p = theUnicodeString.get( ); return DrawString( p, strlen( p ), aX, aY, aSpacing ); }
NS_IMETHODIMP nsRenderingContextPh :: DrawString(const PRUnichar *aString, PRUint32 aLength,                                                  nscoord aX, nscoord aY,                                                  PRInt32 aFontID,                                                  const nscoord* aSpacing){  const int BUFFER_SIZE = (aLength * 3);  char buffer[BUFFER_SIZE];  int len;    len = wcstombs(buffer, (wchar_t *) aString, BUFFER_SIZE);  return DrawString( (char *) buffer, aLength, aX, aY, aSpacing);}