[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Localization problems
From:       Andrey Novikov <scriber () web2000 ! ru>
Date:       2001-03-26 16:34:25
[Download RAW message or body]

Hello,

I  am  new  to  KDE  programming  an  have  two localization
problem, can you, please help me?

1. I have QFile in which I write QString containing extended
characters (ASCII 128-255) using QTextStream:

  QString fileName=locateLocal("appdata","filename");
  file.setName(fileName);
  file.open(IO_ReadWrite);
  QTextStream t(&file);
  QString tt("my local characters string");
  t << tt+"\n";
  file.flush();

but I get '?' marks instead of all extended characters. What
can I do with it?

2.  I  have myfile.html containing extended characters. If I
open in with Konqueror it nicely shows localized characters,
by  if  I try to open it with KHTMLPart it displays only '?'
marks. I tried to set charset but it didn't meter:

  KHTMLPart *w = new KHTMLPart();
  QFile f(locate("appdata","myfile.html"));
  f.open(IO_ReadOnly);
  QTextStream wf(&f);
  w->begin();
  w->write(wf.read());
  f.close();
  w->end();
  w->setCharset("koi8-r",true);
  w->show();

What am I doing wrong?

Best regards,
 Andrey                          mailto:scriber@web2000.ru


 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic