INTEGRATION: CWS fwkpostbeta02 (1.4.112); FILE MERGED
2005/02/14 16:46:47 sb 1.4.112.1: #i42746# Merged in 1.4.108.2; removed commented-out code that contained non-ASCII characters.
This commit is contained in:
parent
795b4f365f
commit
6619ab23ff
1 changed files with 1 additions and 40 deletions
|
@ -49,11 +49,6 @@ namespace Stringtest
|
|||
{
|
||||
rtl::OUString m_aStr;
|
||||
public:
|
||||
void setUp()
|
||||
{
|
||||
// m_aStr = rtl::OUString::createFromAscii( "/tmp/斕疑仇氏卞切反" );
|
||||
}
|
||||
|
||||
/*
|
||||
rtl::OString toUTF8(rtl::OUString const& _suStr)
|
||||
{
|
||||
|
@ -124,7 +119,7 @@ namespace Stringtest
|
|||
showContent(suStr_UriDecodeToIuri);
|
||||
|
||||
// string --> ustring
|
||||
rtl::OString sStr("h鄟lo");
|
||||
rtl::OString sStr("h\xE4llo");
|
||||
rtl::OUString suString = rtl::OStringToOUString(sStr, RTL_TEXTENCODING_ISO_8859_15);
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("Strings must be equal", suString.equals(suStr_UriDecodeToIuri) == sal_True);
|
||||
|
@ -236,11 +231,7 @@ namespace Stringtest
|
|||
void test_FromUTF8()
|
||||
{
|
||||
rtl::OString sStr("h%C3%A4llo");
|
||||
// rtl::OString sStr("h鄟lo");
|
||||
// rtl::OUString suStr = rtl::OStringToOUString(sStr, RTL_TEXTENCODING_ASCII_US);
|
||||
rtl::OUString suStr = rtl::OStringToOUString(sStr, osl_getThreadTextEncoding());
|
||||
// rtl::OString sStr = escapeString( rtl::OString("/tmp/斕疑仇氏卞切反") );
|
||||
// rtl::OUString suStr = rtl::OUString::createFromAscii( sStr.getStr() );
|
||||
|
||||
// rtl_UriEncodeIgnoreEscapes,
|
||||
// rtl_UriEncodeKeepEscapes,
|
||||
|
@ -259,36 +250,6 @@ namespace Stringtest
|
|||
toUTF8(suStr_UriDecodeWithCharset);
|
||||
}
|
||||
|
||||
void test_UTF8()
|
||||
{
|
||||
rtl::OUString aStr = rtl::OUString::createFromAscii( "/tmp/斕疑仇氏卞切反" );
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
void UTF8()
|
||||
{
|
||||
rtl::OString sSysPath5_AsUTF8 = rtl::OUStringToOString(m_aStr, RTL_TEXTENCODING_UTF8);
|
||||
t_print("aSysPath5 as UTF8 '%s'\n", sSysPath5_AsUTF8.getStr());
|
||||
|
||||
{
|
||||
rtl::OUString suSysPath5Str = rtl::OStringToOUString(sSysPath5_AsUTF8, RTL_TEXTENCODING_UTF8);
|
||||
if (suSysPath5Str.equals(m_aStr))
|
||||
{
|
||||
t_print("1. convert works.\n");
|
||||
}
|
||||
}
|
||||
|
||||
sal_Char aSysPath5Str[] = "/tmp/嚙嚙<E59A99>噥嚙嚝歹噫嚝歹興嚝歹選黎嚙嚝歹<E59A9D>";
|
||||
rtl::OString aStr (aSysPath5Str);
|
||||
rtl::OUString suSysPath5Str = rtl::OStringToOUString(aSysPath5Str, RTL_TEXTENCODING_UTF8);
|
||||
if (suSysPath5Str.equals(m_aStr))
|
||||
{
|
||||
t_print("2. convert works.\n");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
CPPUNIT_TEST_SUITE( Convert );
|
||||
CPPUNIT_TEST( test_FromUTF8_001 );
|
||||
// CPPUNIT_TEST( test_UTF8_files );
|
||||
|
|
Loading…
Reference in a new issue