DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9844>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9844

Feature Request: additional XMLString::transcode () variant





------- Additional Comments From [EMAIL PROTECTED]  2002-06-13 18:36 -------
Ahhhh...

maxChars says how big the destination buffer is, the buffer you supply.

The problem is that you don't know how big the output buffer ought to be, 
unless you use the transcoding service directly (through calcRequiredSize) or 
ICU directly (through pre-flighting).

I think it is fairly reasonable to add a convenience method for people to 
transcode to the local code page using a function that wraps calls to the prior 
mentioned functions/methods.

My thoughts to its signature is that it ought to be something like:

    /** Transcodes a string to native code-page
      *
      * NOTE: The returned buffer is dynamically allocated and is the
      * responsibility of the caller to delete it when not longer needed.
      *
      * @param toTranscode The string to be transcoded
      * @param maxChars The maximum number of characters to be transcoded.
      * @return Returns the transcoded string
      */
     virtual char* transcode(const XMLCh* const toTranscode,
       const unsigned int maxChars);

What are other peoples thoughts?

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

Reply via email to