From koffice Tue Apr 20 20:27:26 1999 From: Reginald Stadlbauer Date: Tue, 20 Apr 1999 20:27:26 +0000 To: koffice Subject: Re: Unicode in KWord/KOffice X-MARC-Message: https://marc.info/?l=koffice&m=92516424128531 On Tue, 20 Apr 1999, weis@stud.uni-frankfurt.de wrote: > Hi, > > On Tue, 20 Apr 1999, Reginald Stadlbauer wrote: > > > On Tue, 20 Apr 1999, weis@stud.uni-frankfurt.de wrote: > > > Hi > > > > > > On Mon, 19 Apr 1999, Reginald Stadlbauer wrote: > > > > > > > Hi! > > > > As I'm using QChar as basetype of KWord's string class now, KWord should now > > > > support Unicode (is this correct?) > > > > > > > > But: How does this look like for saving/loading text now. Currently I'm using > > > > something similar to QString::ascii() to get the text, which should be saved. > > > > So this means that KWord doesn't save the text unicoded now. But how should we > > > > do that. How can I pass a unicoded string (array of QChar) to a ostream (we are > > > > using this for saving at the moment). Or should we maybe use the Qt stream > > > > classes for saving/loading in KOffice now? > > > > > > We need to save un UTF8 format. Warwick: How can I read/write UTF8 > > > from/to QString ? > > > > Maybe > > > > QCString QString::utf8() const; > > static QString QString::fromUtf8(const char*, int len=-1); > > Ooops, I did not find that in the docu. Stupid me! > > > help? :-)) > > > > So all I need to do for saving is using QString::utf8() instead of > > QString::ascii() and for loading QString::fromUtf8()? > > Almost. Somehow that has to be mentioned in the first XML tag. > i have to read the standard to find out what needs to be written > so that every parser understands that. > > or does anybody know ? I think should do it. Ciao, Reggie -- ************************************* Reginald Stadlbauer Pfarrweg 8c, A-8010 Graz, Austria (Europe) E-Mail: reggie@kde.org Homepage: http://htualpha.tu-graz.ac.at/reggie Telematik Student an der TU-Graz EDV-Sachbearbeiter an der HTU-Graz KDE fan and developer :-)