Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-English languages (Unicode) #24

Closed
Barbedx opened this issue Aug 20, 2018 · 8 comments
Closed

Support non-English languages (Unicode) #24

Barbedx opened this issue Aug 20, 2018 · 8 comments

Comments

@Barbedx
Copy link

Barbedx commented Aug 20, 2018

process.standardInput encoding problem - don't show cyrylic
Solution:
StreamWriter utf8Writer = new StreamWriter(proc.StandardInput.BaseStream, new UTF8Encoding(false));--disable bom characters
utf8Writer.Write(...);
utf8Writer.Close();

@BobVul
Copy link
Owner

BobVul commented Aug 20, 2018

Can you give me a sample string in Cyrillic to test with?

@BobVul BobVul added the bug label Aug 20, 2018
@Barbedx
Copy link
Author

Barbedx commented Aug 20, 2018 via email

@BobVul
Copy link
Owner

BobVul commented Aug 20, 2018

Cool, thanks. I'll take a look tomorrow, should be fairly simple.

Alternatively it might give me an excuse to move to named pipes...

@BobVul
Copy link
Owner

BobVul commented Aug 21, 2018

Ok, not quite as simple as I'd hoped. There's a lot of iffiness around Windows codepages that make encoding changes for stdin/stdout difficult (e.g. I can easily use a custom encoding when writing to a redirected StandardOutput as you suggested, but I cannot easily change Console.In). The only solution would be calling into native code with P/Invoke... I'm reluctant to do that.

Instead, let's stop using unreliable stdin/stdout altogether and switch to anonymous pipes, which can be passed directly to a child process. Effectively, this should be solved by #9.

@BobVul
Copy link
Owner

BobVul commented Aug 21, 2018

image
image

I will create a 2.0.3 release shortly.

@BobVul BobVul closed this as completed in ce6cb76 Aug 21, 2018
@BobVul
Copy link
Owner

BobVul commented Aug 21, 2018

Please try https://github.com/BobVul/GrowlToToast/releases/tag/v2.0.3. Don't forget to run GrowlerInstaller after the main install so the Growl plugin is updated.

@BobVul BobVul changed the title UTF8 encoding Support non-English languages (Unicode) Aug 21, 2018
@BobVul BobVul added enhancement and removed bug labels Aug 21, 2018
@BobVul BobVul mentioned this issue Aug 21, 2018
@Barbedx
Copy link
Author

Barbedx commented Aug 22, 2018

Great job, thank you very much!

@gimjun
Copy link

gimjun commented Aug 23, 2018

now it also shows emojis 💃 great job!

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

No branches or pull requests

3 participants