About Store Forum Documentation Contact



Post Reply 
Download Html
Author Message
samouraii Offline
Member

Post: #1
Download Html
Hello,

I'm working for download the news for a launcher, but i have a problem.

I receive my News in my launcher with download but, i can receive this caracter: "é, à,è".

this is my code :
Code:
if( downloadNews.state() == DWNL_DONE)
   {
       //FileText f2(download.data(),  download.size());
       FileText f2;
       f2.readMem(downloadNews.data(),  downloadNews.totalSize());
       messages = f2.getAll();
       Gui.msgBox(S, messages);    
      downloadNews.del();
      test.code(messages);
           return true;
   }

the web serveur, i can read:
Quote:é

News test

Nous sommes désolé mais nous travaillons actuellement sur la mise en place des news.

Il y a des é à è !

news 2

but in the game i receive: [Image: 596164Sanstitre.png]

i don't understand why.

And i have a problem for place the text of top, when the texte size change.

thank you for your help

I'm think i need UTF-8
(This post was last modified: 05-10-2016 10:49 AM by samouraii.)
05-10-2016 10:33 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Download Html
I the HTML output does not specify UTF mode, you can force it manually:
f2.readMem(downloadNews.data(), downloadNews.totalSize(), UTF_8);
05-11-2016 12:16 AM
Find all posts by this user Quote this message in a reply
samouraii Offline
Member

Post: #3
RE: Download Html
Hello,

Thank you for your reply, but the problem it's not the same, no change, i can watch for my web server but normaly it's UTF_8

I'm think the problem arrive when i download the information, i watch with wireshark and my trame it's not correct.

Thank you for help
(This post was last modified: 05-11-2016 12:33 PM by samouraii.)
05-11-2016 12:30 PM
Find all posts by this user Quote this message in a reply
Post Reply