Forgot a file in the zip archive

Sorry


Best regards Daniel


From: Gareth Reakes <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Re: UTF8 problems
Date: Tue, 29 Jul 2003 15:42:49 +0100 (BST)

Hi,
        I don't know what SDL_ttf is but here goes a short explanation of
what is going on. If you are using the DOMWriter to write out UTF-8 then
in order to see all the characters you will need to open it in a
editor/browser that understands UTF-8. XMLCh is UTF-16 so you will need to
transcode it before you can see it (I don't know if SDL_ttf will do this
for you). As for the matter of the transcode, it will transcode to your
local code page. Does your local code page support these special
characters?

Gareth


On Tue, 29 Jul 2003, Damien Damien wrote:

> I know this isn't the user mail list... But I couldn't find one... And I
> have a problem. So PLEASE help me :_(
>
> I'm using xerces to read a config file to get multilanguage support:
> It looks like this...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Language>
> <Phrase key="OutOfMemory">Slut p� minne</Phrase>
> <Phrase key="FileNotFound">Filen kunde inte hittas</Phrase>
> </Language>
>
> Now, I'm new to both xerces and unicode. I wonder how do I get the string
> that corresponds to a key and put it in a string or something as UTF-8?
> I tried somthing like this...
>
> void Unicode::ReadStrings(DOMNodeList* pNodes)
> {
> DOMCharacterData* child;
> DOMElement* attribute;
>
> int node_list_length = pNodes->getLength();
> for (int i = 0; i < node_list_length; ++i)
> {
> attribute = dynamic_cast<DOMElement*>(pNodes->item(i));
>
> child =
> dynamic_cast<DOMCharacterData*>(pNodes->item(i)->getFirstChild());
>
> cout << "Length: " << child->getLength() << endl;
> // if p_element is NULL the node is probably a comment
> if (child != NULL)
> {
> string text_string = XMLString::transcode(child->getData());
> AddString(key, text_string);
> .............
>
> child->GetData() returns an XMLCh* containing for example 'Slut p� minne'.'
> But when I tried to use that string in SDL_ttf to print a UTF8 string on the
> screen it only works as long as the string contains ASCII charaters... When
> I put an �, � or � in it doesn't work...
> Also, when I try to print text_string with cout it doesn't work when I try
> to use special chatares...
>
> Thanks in advance... And sorry for taking up your time
> Daniel
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services





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


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

Attachment: xmltest.zip
Description: Zip archive


Attachment: roulette.conf
Description: Binary data

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

Reply via email to