On 21 Nov 2016, at 13:35, Dimitris Chloupis <kilon.alios@gmail.com> wrote:
" reality check... http://utf8everywhere.org/
Sorry I don't remember enough of my Unicode research six months ago to be more help. Only enough to know there are traps and hunt down that article.
cheers -ben"
Really .... ???
So bad ???
Oh well good thing I did not intend to use Unicode. Very eye opening article thanks.
"First read the general introduction
https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfu...
That should be more than enough (we got all basic covered in Pharo).
If you want more, there is the Pharo Unicode project
https://medium.com/concerning-pharo/an-implementation-of-unicode-normalizati...
But you most probably don't need that.
I thought that Windows used UTF-16 internally
https://en.wikipedia.org/wiki/UTF-16#Usage"
Yes Windoom uses UTF-16, I am amazed how the coding world managed to take another simple problem and make it so complex.
In any case , I dont need Unicode . I made the decision to just chain string characters together in 2 byte unicode arrays , I wont be converting from or to Unicode anyway. For usual English characters the second byte of a Unicode character array on Win 10 is always 00 which is a waste of memory anyway.
Unicode may come handy when I have to deal with translating the game to other languages , but this for now is a very low priority.
As always I love your medium posts, clear, simple and to the point. Definitely bookmarked for future reference. Thanks
You might as well use the real thing (and then you're good for the future too): ZnUTF16Encoder new encodeString: 'Îλλάδα'. "#[3 149 3 187 3 187 3 172 3 180 3 177]" ZnUTF16Encoder new encodeString: 'Greece'. "#[0 71 0 114 0 101 0 101 0 99 0 101]" ZnUTF16Encoder new decodeBytes: #[3 149 3 187 3 187 3 172 3 180 3 177]. "'Îλλάδα'" ZnUTF16Encoder new decodeBytes: #[0 71 0 114 0 101 0 101 0 99 0 101]. "'Greece'" Good luck with your coding. Sven