To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=70752
                 Issue #|70752
                 Summary|unhelpful string constructors ...
               Component|utilities
                 Version|680m189
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|hro
             Reported by|mmeeks





------- Additional comments from [EMAIL PROTECTED] Mon Oct 23 09:37:31 -0700 
2006 -------
The existing string constructors cause problems because people do:

String( ...CONST_ASCII_PARAM("foo"))

and this bogusly passes the length as the textencoding to the string:

UniString( const sal_Char* pByteStr,
           rtl_TextEncoding eTextEncoding,
           sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS );

Which is deadly broken - a number of these happen on OO.o startup, see bug 
i#70166#.

In order to do anything, I'd like a design that would be acceptable up-stream,
an idea might be some:

class StringEncoding {
      rtl_TextEncoding eEncoding;
public:
     explicit StringEncoding( rtl_TextEncoding eFoo ) : eEncoding (eFoo) {}
};
...


UniString( const sal_Char* pByteStr,
-          rtl_TextEncoding eTextEncoding,
+          StringEncoding aTextEncoding,
           sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS );

or whatever you like.
Thanks.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to