bug 268219 NS_CopyNativeToUnicode/NS_CopyUnicodeToNative on Mac OS X should use CopyUTF8toUTF16/CopyUTF16toUTF8, r=ccarlen sr=darin
git-svn-id: svn://10.0.0.236/trunk@165109 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
* Frank Tang <ftang@netscape.com>
|
||||
* Brendan Eich <brendan@mozilla.org>
|
||||
* Sergei Dolgov <sergei_d@fi.fi.tartu.ee>
|
||||
* Jungshik Shin <jshin@i18nl10n.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@@ -41,10 +42,44 @@
|
||||
|
||||
#include "xpcom-private.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// XP_MACOSX or XP_BEOS
|
||||
//-----------------------------------------------------------------------------
|
||||
#if defined(XP_BEOS) || defined(XP_MACOSX)
|
||||
|
||||
#include "nsAString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsString.h"
|
||||
|
||||
NS_COM nsresult
|
||||
NS_CopyNativeToUnicode(const nsACString &input, nsAString &output)
|
||||
{
|
||||
CopyUTF8toUTF16(input, output);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_COM nsresult
|
||||
NS_CopyUnicodeToNative(const nsAString &input, nsACString &output)
|
||||
{
|
||||
CopyUTF16toUTF8(input, output);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
NS_StartupNativeCharsetUtils()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
NS_ShutdownNativeCharsetUtils()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// XP_UNIX
|
||||
//-----------------------------------------------------------------------------
|
||||
#if defined(XP_UNIX)
|
||||
#elif defined(XP_UNIX)
|
||||
|
||||
#include <stdlib.h> // mbtowc, wctomb
|
||||
#include <locale.h> // setlocale
|
||||
@@ -824,39 +859,6 @@ NS_ShutdownNativeCharsetUtils()
|
||||
nsNativeCharsetConverter::GlobalShutdown();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// XP_BEOS
|
||||
//-----------------------------------------------------------------------------
|
||||
#elif defined(XP_BEOS)
|
||||
|
||||
#include "nsAString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsString.h"
|
||||
|
||||
NS_COM nsresult
|
||||
NS_CopyNativeToUnicode(const nsACString &input, nsAString &output)
|
||||
{
|
||||
CopyUTF8toUTF16(input, output);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_COM nsresult
|
||||
NS_CopyUnicodeToNative(const nsAString &input, nsACString &output)
|
||||
{
|
||||
CopyUTF16toUTF8(input, output);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
NS_StartupNativeCharsetUtils()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
NS_ShutdownNativeCharsetUtils()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// XP_WIN
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user