RE: Unicode with MFC (was MemBufInputSource with CString)

2004-02-27 Thread Hiran.Chaudhuri
correct (UTF-8) encoding for me.   Hiran -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Sent: Wednesday, February 25, 2004 3:41 PMTo: [EMAIL PROTECTED]Subject: Unicode with MFC (was MemBufInputSource with CString) Hi, Lei.   Meanwhile I was able to

Unicode with MFC (was MemBufInputSource with CString)

2004-02-25 Thread Hiran.Chaudhuri
4:57 AMTo: [EMAIL PROTECTED]Subject: Re: MemBufInputSource with CString Hi, Hiran,   If you're using VC++, it's best to use CString for portability between ANSI and UNICODE build.   Though the type of CString's internal storage changes according to the "UNIC

RE: MemBufInputSource with CString

2004-02-11 Thread Chaudhuri, Hiran
, February 08, 2004 4:57 AMTo: [EMAIL PROTECTED]Subject: Re: MemBufInputSource with CString Hi, Hiran,   If you're using VC++, it's best to use CString for portability between ANSI and UNICODE build.   Though the type of CString's internal storage changes according

Re: MemBufInputSource with CString

2004-02-07 Thread jiang lei
er use. And it's not recommended to put them in a loop. Consult your MSDN for more information.     regards   Lei       - Original Message - From: "Chaudhuri, Hiran" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 06, 2004 9:25 PM Subject:

RE: MemBufInputSource with CString

2004-02-06 Thread Chaudhuri, Hiran
Hi, Alberto. Makes sense. Will try it when I get that far. Thank you. Hiran > -Original Message- > From: Alberto Massari [mailto:[EMAIL PROTECTED] > Sent: Friday, February 06, 2004 1:14 PM > To: [EMAIL PROTECTED] > Subject: RE: MemBufInputSource with CString > >

RE: MemBufInputSource with CString

2004-02-06 Thread Alberto Massari
M > To: [EMAIL PROTECTED] > Subject: Re: MemBufInputSource with CString > > > Hi Jimmy, > > A few suggestions: > > 1.in your function void X(CString setting, CString changeval) , > Passing parameters by object is usually not a good idea. > Unless, of course > you

RE: MemBufInputSource with CString

2004-02-06 Thread Chaudhuri, Hiran
- > From: jiang lei [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 04, 2004 9:41 AM > To: [EMAIL PROTECTED] > Subject: Re: MemBufInputSource with CString > > > Hi Jimmy, > > A few suggestions: > > 1.in your function void X(CString setting, CString chang

Re: MemBufInputSource with CString

2004-02-04 Thread Jimmy Yu
Jesse & Lei,   I thank you both for your input and comments, I shall use adoptDocument() instead of getDocument and I will keep it as const char* in my hpp file. There is no need for Unicode forward looking at this point in the company project. The reason for CString in the param is that it

RE: MemBufInputSource with CString

2004-02-04 Thread Jesse Pelton
comes with some overhead). As Lei pointed out, a character pointer would suffice in the example code you sent. It's still worth considering TCHAR instead of char. -Original Message-From: Jimmy Yu [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 03, 2004 5:12 PMTo: [EMAI

Re: MemBufInputSource with CString

2004-02-04 Thread jiang lei
Hi Jimmy, A few suggestions: 1.in your function void X(CString setting, CString changeval) , Passing parameters by object is usually not a good idea. Unless, of course you want to make copies and leave the masters intact.( CString's copy constructor, however, will share the master's buffer if th

Re: MemBufInputSource with CString

2004-02-03 Thread Jimmy Yu
Jesse,   Thanks for the const char* advice, that takes care of my crash. to fix the leak, would you recommend I change my original:   DOMDocument* ConstraintChecker::ParseDoc(const char *mem){   MemBufInputSource *memBufIS = new MemBufInputSource((const XMLByte*)mem, strlen(mem), gMemBufId,

RE: MemBufInputSource with CString

2004-02-03 Thread Jesse Pelton
your actual code, Xerces' behavior is undefined. -Original Message-From: Jimmy Yu [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 03, 2004 2:41 PMTo: [EMAIL PROTECTED]Subject: MemBufInputSource with CString Hello,   I have a question in regards to CString in usage with

MemBufInputSource with CString

2004-02-03 Thread Jimmy Yu
Hello,   I have a question in regards to CString in usage with MemBufInputSource.   Here is an example of my code:   DOMDocument* ParseDocument(char *membuffer) {    MemBufInputSource *memBufIS = new MemBufInputSource((const XMLByte*)mem, strlen(mem), gMemBufId, false);   XercesDOMParser *do