FS#9246 - Messaging from voice.pl to sapi_voice.vbs mangled on Japanese Windows
Based on comments in FS#9148 , speculation is that Windows is not translating messages as if they were win1252, but something else.
Ideally, sapi_voice.vbs should be fixed so that strings are always passed in a consistent way.
One way, suggested by Taktak (Whick) is to encode the byte-value to ascii (numbers), and decode in sapi_voice.vbs. Patch for that in FS#9148 .
Closed by amiconn
2008-08-07 20:06
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
2008-08-07 20:06
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
I've committed the patch, including
a fix for the 'wide character'
warning.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
I *think* I do understand the problem now. The vbscript assumes the passed data is in “pseudo-utf8”, but this isn’t true on japanese Windows (and probably other multibyte Windows variants). While converting everything into a list of bytes works, it’s not an elegant solution. I have prepared a patch that does away with the UTF8decode() function in the vbscript altogether, and lets PerlIO do the conversion work. All data passing between voice.pl and sapi_voice.vbs is now done in utf-16le (native windows encoding), meaning it should work on all language variants of Windows.
These changes should also be tested on linux, as one of the changes in voice.pl will affect all platforms:
use open IN ⇒ ‘:utf8’;
Note: On cygwin it might be necessary to use the –binary option to apply the patch without getting failed hunks, i.e.:
patch -p0 –binary <sapi_unicode.diff
I have created japanese.lang and english.lang with this patch, cygwin and LH Naoko.
Thank you so much!
My rockbox with this lang file is able to speak japanese and english well!
Will you commit it?
But those long long error was printed on screen while I was making japanese.lang on cygwin.
.(see attached file)
Now, I don’t know why. I’m sorry that I’ll go bed now.