dgw / sopel-wolfram

Wolfram|Alpha plugin for the Sopel IRC framework
Other
5 stars 1 forks source link

Unicode in W|A output glitchy #14

Closed dgw closed 4 years ago

dgw commented 7 years ago

Something like this shouldn't happen, but will need to dig a bit to see if it's this module or the library.

<dgw> .wa 科学
<Kaede> [W|A] translate | \:79d1\:5b66 | to English = from Japanese:  | science
<Kaede> [W|A] from Cantonese:  | science

Compare the output from Rizon's similar function in their Internets bot:

<dgw> .cc 科学
<Internets> [W|A] translate | 科学 | to English = from Japanese:  | science
<Internets> from Cantonese:  | science

Not tested with extended Unicode characters outside the Japanese set, but presumably there are other character ranges that do not work.

dgw commented 7 years ago

Preliminary experimentation with the API directly indicates that it might "fix" this to specify format=plaintext when querying Wolfram|Alpha… We'll see.

dgw commented 7 years ago

Will be fixed in 0.3.2 and then pulled into master for 0.4. Closing.

dgw commented 7 years ago

Note: Because of #17, this is no longer considered fixed for 0.3.x. The issue will remain closed, as the change was merged in for 0.4.0.

dgw commented 6 years ago

Not fixed. The API docs aren't helping at all, but even in debug API requests sent manually the plaintext format doesn't fix this (any more?).

dgw commented 4 years ago

Interestingly, I tried to poke at this issue again today and now the example "科学" fails on BOTH sopel-wolfram and Rizon's Internets service. It seems Wolfram's interpretation of that input has changed (entering it on the website shows "Input interpretation: scientific (English word)").

Trying to find an alternative test case wasn't immediately successful. Simple foreign-language input (single words, mostly) just gets interpreted as the English translation and isn't picked up by the wolframalpha library in the way the code expects (and Internets says it's invalid input). Longer foreign-language input—phrases or whole sentences—fails even on the W|A website ("Wolfram|Alpha doesn't understand your query").

Until (and unless) someone can find me an example that still causes this problem in the latest version of the plugin (v0.5.0 will be out Soon™ as a compatibility bump for Sopel 7), I'll once again close this.