INTEGRATION: CWS hrobeta2 (1.2.108); FILE MERGED
2005/02/10 14:52:16 sb 1.2.108.1: #i42350# Removed non-ASCII characters from string literals.
This commit is contained in:
parent
277abf6b4f
commit
d1ebe20b94
1 changed files with 6 additions and 6 deletions
|
@ -88,35 +88,35 @@ namespace rtl_string
|
|||
|
||||
void convertUStringToString_002()
|
||||
{
|
||||
rtl::OString sStr("Hällo");
|
||||
rtl::OString sStr("H\xE4llo");
|
||||
rtl::OUString suString = rtl::OStringToOUString(sStr, RTL_TEXTENCODING_ISO_8859_15);
|
||||
|
||||
rtl::OString sString;
|
||||
sal_Bool bRet = rtl_convertUStringToString(&sString.pData, suString.getStr(), suString.getLength(), RTL_TEXTENCODING_ISO_8859_15, OUSTRING_TO_OSTRING_CVTFLAGS);
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("Strings must be equal", bRet == sal_True && sString.equals(rtl::OString("Hällo")) == sal_True);
|
||||
CPPUNIT_ASSERT_MESSAGE("Strings must be equal", bRet == sal_True && sString.equals(rtl::OString("H\xE4llo")) == sal_True);
|
||||
}
|
||||
|
||||
void convertUStringToString_003()
|
||||
{
|
||||
rtl::OString sStr("Hällo");
|
||||
rtl::OString sStr("H\xC3\xA4llo");
|
||||
rtl::OUString suString = rtl::OStringToOUString(sStr, RTL_TEXTENCODING_UTF8);
|
||||
|
||||
rtl::OString sString;
|
||||
sal_Bool bRet = rtl_convertUStringToString(&sString.pData, suString.getStr(), suString.getLength(), RTL_TEXTENCODING_ISO_8859_15, OUSTRING_TO_OSTRING_CVTFLAGS);
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("Strings must be equal", bRet == sal_True && sString.equals(rtl::OString("Hällo")) == sal_True);
|
||||
CPPUNIT_ASSERT_MESSAGE("Strings must be equal", bRet == sal_True && sString.equals(rtl::OString("H\xE4llo")) == sal_True);
|
||||
}
|
||||
|
||||
void convertUStringToString_004()
|
||||
{
|
||||
rtl::OString sStr("Tschüß");
|
||||
rtl::OString sStr("Tsch\xFC\xDF");
|
||||
rtl::OUString suString = rtl::OStringToOUString(sStr, RTL_TEXTENCODING_ISO_8859_15);
|
||||
rtl::OString sString;
|
||||
|
||||
sal_Bool bRet = rtl_convertUStringToString(&sString.pData, suString.getStr(), suString.getLength(), RTL_TEXTENCODING_UTF8, OUSTRING_TO_OSTRING_CVTFLAGS);
|
||||
/* sal_Bool */ bRet = rtl_convertUStringToString(&sString.pData, suString.getStr(), suString.getLength(), RTL_TEXTENCODING_ISO_8859_15, OUSTRING_TO_OSTRING_CVTFLAGS);
|
||||
CPPUNIT_ASSERT_MESSAGE("Strings must be equal", bRet == sal_True && sString.equals(rtl::OString("Tschüß")) == sal_True);
|
||||
CPPUNIT_ASSERT_MESSAGE("Strings must be equal", bRet == sal_True && sString.equals(rtl::OString("Tsch\xFC\xDF")) == sal_True);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue