Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Infrastructure → Build environment
  • Assigned To
    rasher
    amiconn
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by rasher - 2008-08-06
Last edited by amiconn - 2008-08-07

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

I've committed the patch, including a fix for the 'wide character' warning.

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

Whick commented on 2008-08-07 17:04

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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing