Closed ghost closed 6 months ago
Objeck initially used char
for strings, which was appropriate for its 32-bit targets year ago. The code was refactored to support wchar_t
and legacy conversions between the types. It's worth noting that UTF-8 is a standard I/O exchange format, and I have no plans to change that in Objeck.
It's worth noting that UTF-8 is a standard I/O exchange format, and I have no plans to change that in Objeck.
So you think rewriting it to have strings to be UTF-8 on all platforms is more feasible?
Stop insulting me!
What's going on? Did I write something wrong?
I have put a lot of work into your requests. You stated that I hacked the code to print a practical value, which is not how I engineer solutions. It takes time and thought to implement such requests.
This is not a feature request. This is only a discussion for fun. I just found out that .NET strings are UTF-16 regardless of platforms. The same thing is true for Java, too. To do this, the .NET guys have to use the library ICU on Linux. They are now using
char16_t
instead ofwchar_t
. Recently, they decided to use the library ICU on Windows, too. So, they no longer use the Windows API for text encoding. Library ICU is modeled after Java's text encoding. The JVM guys also introduced a modified UTF-8 text encoding for their internal use within the JVM. The reason .NET and Java use UTF-16 and are stuck with it is because they are one of the early adopters of Unicode. It turned out that UTF-16 stinks, and the world is now embracing UTF-8.The reason Objeck used
wchar_t
from the beginning was because of the influences of Java, wasn't it? Between going to UTF-16 for all platforms and switching to UTF-8 for all platforms, do you think which is more doable?