View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#335
Originally Posted by 白い熊 View Post
Hmmm... in that case I'd just recommend testing all parts of the text that you can split up for being unibyte/multibyte, I programmed this for sending SMSes in GNU Emacs, since when sending for instance Czech text, or Russian, the length of the SMS is less than half the regular one...

Anyhow, since currently modrana doesn't navigate in Russia due to getting stuck on multibyte text (and I'm sure this is a case in some other countries as well), can you as a temp solution, basically parse the results you get from Google by testing each respectable substring, delimited by spaces for instance, to see if it's multibyte or unibyte? This is easy to do by comparing string length and text length, if they differ, it's multibyte.

If it's multibyte just throw it out and not have espeak pronounce it, and that way it's not gonna get stuck in an endless loop, and there'll be routing navigation in Russia?

Temp solution, but better than not being to route at all currently...
OK, I think I'll do this:
  • add an option to remove all non-ASCII words from the directions
  • split the talking and drawing code (the talking code is currently inside the drawing code, which is not good and might be at least partially causing the problems you describe )
  • passing the messages to espeak not by command line but as a file in /tmp - might be safer than passing all the Unicode through the shell

BTW, what firmware are you using ? I think I heard that there are some local/global variants.

I am running what appears to be some European version (there are only European languages, including Russian) with the language set to Czech. All the Cyrilic is being displayed correctly (and voice output i working too):

__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 4 Users Say Thank You to MartinK For This Useful Post: