K.WIKI wrote:
Hi All
I have a probleme the special charactere
so I have a methode that get a string , this string can conteaint some
special caractere like
"ϑ ϒ ϖ – — ‘ ’ ‚ “ ” „ † ‡ • … ‰ ′ ″ ⁄ € ℑ ℘ ℜ ™ ℵ ← ↑ → ↓ ↔ ↵ ⇐ ⇑ ⇒ ⇓ ⇔ ∀
∂ ∃ ∅ ∇ ∈ ∉ ∋ ∏ ∑ − ∗ √ ∝ ∞ ∠ ∧ ∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤ ≥ ⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅
⌈ ⌉ ⌊ ⌋ 〈 〉 ◊ ♠ ♣ ♥ ♦"
so when I use transcose, somme of this characters changed to ????
thus is My code
I put my string in this variable strMessage
XMLString::transcode("Message",xmlChTempStr,(LENGTH_TEMPORAL_STRING - 1));
DOMElement * chmessage = m_xmlDoc->createElement(xmlChTempStr);
chText->appendChild(chmessage);
XMLString::transcode(strMessage,xmlChTemStr,(LENGTH_TEMPORAL_STRING - 1));
textNode = m_xmlDoc->createTextNode(xmlChTemStr);
chmessage ->appendChild(textNode);
any help plz
XMLString::transcode() converts between the local code page and UTF-16,
which is Xerces' internal format.
It's not a good idea to depend on the local code page, since it can vary
between systems, and your current local code page may not support all of
the characters you're interested in. That seems to be the case here.
You should either keep all of your data in UTF-16, or use a transcoder
for the actual encoding of your data. If you don't know the encoding of
your data, that's the first problem you need to solve. Once you've done
that, you can create a transcoder for the correct encoding.
There are numerous postings in the archives that will contain more
details that will help you. I suggest you search the archives, do some
research, then post again if you have more questions.
Dave