[Kde-accessibility] KTTS kspeech::setFile() method and text encoding

Gary Cramblitt garycramblitt at comcast.net
Mon Jan 10 00:03:40 CET 2005


On Thursday 30 December 2004 04:26 pm, Gary Cramblitt wrote:
> There is a problem in the current KDE Text-to-Speech system regarding file
> encoding.  The "Speak File" button in KTTSMgr does not work correctly when
> specifying a file that has text encoded differently from the user's desktop
> encoding setting.  For example, if my desktop is set to ISO 8859-1 or
> UTF-8, and I open a Polish file encoded in ISO 8859-2, the text is mangled
> and not spoken properly.
>
> I'd like to fix this by changing the kspeech::setFile() method, adding an
> encoding parameter.  To my knowledge, the only application currently using
> this method is KTTSMgr.  Does anyone object if I modify this method?

Be advised that I have made the change described above to 
kdelibs/interfaces/kspeech/kspeech.h.

If you are calling the setFile method via manual dcop, you must add a 3rd 
argument for the encoding.  You may code as 0 to use default QTextStream 
encoding detection.  AFAIK, no applications other than KTTSMgr are using this 
method.

If you are using the kspeech stubs, you will need to 1) cvs up 
kdelibs/interfaces/kspeech and make install, 2) cvs up kdeaccessibility and 
make install, 3) rebuild your app.  AFAIK, ksayit is the only app using the 
stubs, and since it is part of kdeaccessibility, should not be an issue if 
you rebuild both ksayit and kttsd.

-- 
Gary Cramblitt (aka PhantomsDad)
KDE Text-to-Speech Maintainer
http://accessibility.kde.org/developer/kttsd/index.php


More information about the kde-accessibility mailing list