http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1601 *** shadow/1601 Wed May 2 08:53:55 2001 --- shadow/1601.tmp.8691 Wed May 2 08:53:55 2001 *************** *** 0 **** --- 1,76 ---- + +============================================================================+ + | DOMString bug | + +----------------------------------------------------------------------------+ + | Bug #: 1601 Product: Xerces-C | + | Status: NEW Version: 1.4 | + | Resolution: Platform: PC | + | Severity: Blocker OS/Version: Linux | + | Priority: High Component: DOM | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + On linux slackware 7.1 kernel 2.4.4 + gcc version :2.95.2 + platform :i686 + Xerces-C vers 1.4 + local setting in .cshrc + if ($status == 0) stty cs8 -istrip -parenb + setenv LC_CTYPE ISO-8859-1 + setenv LANG fr_CA + + Desc : DOMString.length return length 0 and can't retreive the value from + is node (TEXTNODE) when we give him a string containing latin (french) + character. + + First, I parse the XML document (containing the french accents) with SAX + and it works perfectly. The data is stored in map (string keyname and string + value) and the accents are keept. Then after we get data from map and put them + all in DOM tree to do a XML file. + + This is the problem: If I insert a string to a text DOM node without accent + the node get the data without problem (we can extract data successfully) but if + I put 1 or more accent wherever the position, I retreive nothing from Dom node + but the Dom node pointer is not NULL + + I checked the string before inserting it, in the TEXTNODE and all the accents + apprear. I insert data in DOM node like this : + + mapElem.appendChild(doc.createTextNode(thisMap->mapit(keyname).c_str())); + + Ps : I can't retreive data with rawBuffer() function if the node contains + French accents + + I changed my locale a lot of time (default, with iso-8859-1, etc) and it + does nothing. + + This is the small XML and DTD file i use : + XML: + <?xml version="1.0" encoding="ISO-8859-1"?> + <TEST> + <CFG id="W_ORDER_NOT_REVIEWED"><EN>This order as been submitted but hasn't been + reviewed yet.</EN><FR>Cette commande a été soumise et sera traitée sous + peu.</FR></CFG> + <CFG id="W_ORDER_PROCESSING"><EN>This order is being processed.</EN><FR>Cette + commande est en traitement.</FR></CFG> + <CFG id="W_ORDER_COMPLETED"><EN>This order is completed.</EN><FR>Cette commande + a été traitée et complétée.</FR></CFG> + <CFG id="W_ORDER_CANT_PROCESS"><EN>This order will not be + processed.</EN><FR>Cette commande ne sera pas traitée.</FR></CFG> + </TEST> + + DTD: + <?xml encoding="ISO-8859-1"?> + <!ELEMENT TEST (CFG)+> + <!ELEMENT CFG (#PCDATA|EN|FR|ES)*> + <!ATTLIST CFG id ID #REQUIRED> + <!ELEMENT EN (#PCDATA)> + <!ELEMENT FR (#PCDATA)> + <!ELEMENT ES (#PCDATA)> + + Thanks in advance for your help + Martin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]