Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

German characters #50

Closed
muhkuh0815 opened this issue Nov 26, 2011 · 14 comments
Closed

German characters #50

muhkuh0815 opened this issue Nov 26, 2011 · 14 comments
Assignees

Comments

@muhkuh0815
Copy link

German special characters like Ä Ö Ü seems to crash the Siriproxy.

i have no idea if thats something you can fix, but would be nice if it works.

and my second question. is there a possibility to "listen_for" 2 or more seperate words ?

i would like to listen for e.g. "Johnny" and "cook" in one sentense

so i can ask for "can Johnny cook" or "is Johnny able to cook"

sorry for my bad english, and keep up your great work
very appreciated
Greetings from Austria
Michael

@plamoni
Copy link
Owner

plamoni commented Nov 26, 2011

I'll look into the special character crashing thing.

As for listening for two words:

https://github.com/plamoni/SiriProxy-Thermostat/blob/master/lib/siriproxy-thermostat.rb#L12-13

That's how I do it. You can probably figure a better way.

-Pete

On Sat, Nov 26, 2011 at 12:45 PM, muhkuh0815 <
reply@reply.github.com

wrote:

German special characters like seems to crash the Siriproxy.

i have no idea if thats something you can fix, but would be nice if it
works.

and my second question. is there a possibility to "listen_for" 2 or more
seperate words ?

i would like to listen for e.g. "Johnny" and "cook" in one sentense

so i can ask for "can Johnny cook" or "is Johnny able to cook"

sorry for my bad english, and keep up your great work
very appreciated
Greetings from Austria
Michael


Reply to this email directly or view it on GitHub:
#50

@muhkuh0815
Copy link
Author

Thank you, works perfect.

@ghost ghost assigned chendo Nov 27, 2011
@plamoni
Copy link
Owner

plamoni commented Nov 27, 2011

Chendo: this one is all you. Mostly because I'm too lazy to fix. Get with me in chat if you want to discuss.

@muhkuh0815
Copy link
Author

heres the error message i get when anywhere in the siriproxy-example file is a Ä Ö Ü or ß character.
hope it helps

plugin_manager.rb:22:in `require': /Users/xxx/SiriProxy/plugins/siriproxy-example/lib/siriproxy-example.rb:49: invalid multibyte char (US-ASCII) (SyntaxError)
/Users/xxx/SiriProxy/plugins/siriproxy-example/lib/siriproxy-example.rb:49: syntax error, unexpected tIDENTIFIER, expecting keyword_end

@Matoz
Copy link

Matoz commented Nov 27, 2011

I had problems with ÜÄÖ too.

Seems to be a file encoding problem. I was able to work around this by converting and editing the file in UTF-8. Before uploading to my Dreamplug (Ubuntu) I change the encoding to ANSI (not converting). I´m editing my file with Notepad++ on Windows.

I am not sure why this works. Perhaps someone else can clarify this.

@kalbasit
Copy link
Contributor

it seems that the encoding is not UTF-8, it should be solved by simply adding

# -*- encoding: utf-8 -*-

at the top of all ruby files even the plugins

/cc @plamoni @netpro2k @chendo

@kalbasit
Copy link
Contributor

It might be also a good idea to add

# Make sure we are running UTF-8
Encoding.default_external = 'utf-8'

in the lib/siriproxy.rb file to ensure all externally open files (if any) are being opened in UTF-8 mode

@zobi
Copy link

zobi commented Dec 14, 2011

Same problem with french character like : éèà ...
thanks ;)

@kalbasit
Copy link
Contributor

@zobi could you try the patch in #113 ?

@zobi
Copy link

zobi commented Dec 14, 2011

i try to put :
Encoding.default_external = 'utf-8'
on all my .rb file but it didn't work :/

@kalbasit
Copy link
Contributor

Not Encoding.default_external = 'utf8' but this as the first line of each .rb file

# -*- encoding: utf-8 -*-

Just apply this patch

curl -o- https://github.com/eMxyzptlk/SiriProxy/commit/739b0cefb3e60b94514123c010820a1d51c99dfb.patch | patch -Np1

@zobi
Copy link

zobi commented Dec 14, 2011

Ho great it works like a charm !!
Thanks you very much for this patch ;)

@Doriginal
Copy link

hello,
I have the same problem with the characters in French é î à ...
How to apply your patch, because as I lanche he asks me things and I'm lost
:(

thank you

@elvisimprsntr
Copy link
Collaborator

seems like this was fixed by adding encoding utf-8 to plugins.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants