bloznelis / typioca

Cozy typing speed tester in terminal
MIT License
750 stars 22 forks source link

Add support for international strings #34

Closed ernierasta closed 2 years ago

ernierasta commented 2 years ago

Hi! Thank you for great typing test. Terminal is much better place for me then online services. Great work!

I would like to use other languages to type in, but there is problem with characters created by more then one byte.

This PR solves that. When we use []rune everywhere where we work with index it solves problem.

If you want to test current problems or this fix overwrite file src/embedables/words/common-english.txt with this content for example:

cześć
łżóń
śruba
żółć
kość

There is currently another small bug, related to generating lists of words (I will send another PR in minute ;-)), so ignore "empty word" bug.