Commit 65c4f895 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

xml dom utf8

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64785 954022d7-b5bf-4e40-9824-e11837661b57
parent d1989540
#include "doctrenderer.h" #include "doctrenderer.h"
#ifdef BOOL #ifdef BOOL
#undef BOOL #undef BOOL
......
#ifndef DOCTRENDERER_H #ifndef DOCTRENDERER_H
#define DOCTRENDERER_H #define DOCTRENDERER_H
#include <string> #include <string>
......
#ifndef MEMORYSTREAM #ifndef MEMORYSTREAM
#define MEMORYSTREAM #define MEMORYSTREAM
#include <string> #include <string>
......
#ifndef NATIVECONTROL #ifndef NATIVECONTROL
#define NATIVECONTROL #define NATIVECONTROL
#include "memorystream.h" #include "memorystream.h"
......
...@@ -50,9 +50,9 @@ namespace XmlUtils ...@@ -50,9 +50,9 @@ namespace XmlUtils
for (p = m_attributes.begin(); p != m_attributes.end(); ++p) for (p = m_attributes.begin(); p != m_attributes.end(); ++p)
{ {
oWriter.WriteString(L" ", 1); oWriter.WriteString(L" ", 1);
oWriter.WriteEncodeXmlString(NSFile::CUtf8Converter::GetUnicodeFromCharPtr(p->first.c_str(), p->first.length(), true).c_str()); oWriter.WriteEncodeXmlString(NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)p->first.c_str(), (LONG)p->first.length()).c_str());
oWriter.WriteString(L"=\"", 2); oWriter.WriteString(L"=\"", 2);
oWriter.WriteEncodeXmlString(NSFile::CUtf8Converter::GetUnicodeFromCharPtr(p->second.c_str(), p->second.length(), true).c_str()); oWriter.WriteEncodeXmlString(NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)p->second.c_str(), (LONG)p->second.length()).c_str());
oWriter.WriteString(L"\"", 1); oWriter.WriteString(L"\"", 1);
} }
...@@ -381,7 +381,7 @@ namespace XmlUtils ...@@ -381,7 +381,7 @@ namespace XmlUtils
if (pFind == m_pBase->m_attributes.end()) if (pFind == m_pBase->m_attributes.end())
return _default; return _default;
return NSFile::CUtf8Converter::GetUnicodeFromCharPtr(pFind->second); return NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pFind->second.c_str(), (LONG)pFind->second.length());
} }
std::wstring CXmlNode::GetAttribute(const std::wstring& sName, const std::wstring& _default) std::wstring CXmlNode::GetAttribute(const std::wstring& sName, const std::wstring& _default)
{ {
...@@ -392,7 +392,7 @@ namespace XmlUtils ...@@ -392,7 +392,7 @@ namespace XmlUtils
if (pFind == m_pBase->m_attributes.end()) if (pFind == m_pBase->m_attributes.end())
return _default; return _default;
return NSFile::CUtf8Converter::GetUnicodeFromCharPtr(pFind->second); return NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pFind->second.c_str(), (LONG)pFind->second.length());
} }
std::wstring CXmlNode::GetAttribute(const wchar_t* sName, const std::wstring& _default) std::wstring CXmlNode::GetAttribute(const wchar_t* sName, const std::wstring& _default)
{ {
...@@ -412,7 +412,7 @@ namespace XmlUtils ...@@ -412,7 +412,7 @@ namespace XmlUtils
if (pFind != m_pBase->m_attributes.end()) if (pFind != m_pBase->m_attributes.end())
{ {
sOutput = NSFile::CUtf8Converter::GetUnicodeFromCharPtr(pFind->second); sOutput = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pFind->second.c_str(), (LONG)pFind->second.length());
bRes = true; bRes = true;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment