CrendKing / avisynth_filter

DirectShow filters that put AviSynth and VapourSynth into video playing
MIT License
107 stars 8 forks source link

Switch to Unicode #1

Closed chainikdn closed 3 years ago

CrendKing commented 3 years ago

Here is the reason why all my C++ projects are using char instead of wchar_t. If you haven't read https://utf8everywhere.org/, please take a look. It is a popular article talking about the advantage of UTF-8 over UTF-16 and other encodings. Now, since April 2018, Windows 10 started supporting native UTF-8 with char in C++. Wikipedia has some information According to my test, with that "Beta: Use Unicode UTF-8 for worldwide language support" checkbox enabled, using char can handle non-ASCII strings.

Granted, the UTF-8 support was not enabled by default. This Stack Overflow question mentions some ways to enable it pragmatically. Unfortunately, enabling this may cause some compatibility issue with some old applications.

So I'm struggling to accept this PR. On one hand, I do not like wchar_t and UTF-16. On the other hand, it might be the only way at the moment to support non-ASCII reliably. What do you think?

chainikdn commented 3 years ago

Since I'll need this filter to work everywhere, including Chinese Windows 7, I don't see many options. We can't rely on some Win10-only beta option which is still "beta" as of Win10 2004.