joaomneto / TitanCompanion

Android app to support Fighting Fantasy gamebook playing without the use of additional pen, paper and dice. The objective is for the reader to immerse himself fully on the book and let the app do the rest of the work. The objective of this application is to support the distinct rules of each Fighting Fantasy gamebook.
GNU Lesser General Public License v3.0
14 stars 4 forks source link

Fix double UTF-8-encoding issue #164

Open tychobrailleur opened 4 years ago

tychobrailleur commented 4 years ago

When loading a saved adventure, the characters with diacritics are getting corrupted with for example “Bois éternel” getting encoded as “Bois éternel”, which suggests a double-encoding issue.

The problem is caused by Properties#load(InputStream) which assumes a latin-1 stream (how rude), so the fix is to use readers instead to avoid encoding problems. I don't know Kotlin so the fix may not be optimal.

(this PR also deletes a spurious file that's not used)

joaomneto commented 4 years ago

Hello @tychobrailleur. Merci beaucoup pour tes contributions. Je t'ai invité comme colaborateur si ça t'intéresse.

tychobrailleur commented 4 years ago

Hello @tychobrailleur. Merci beaucoup pour tes contributions. Je t'ai invité comme colaborateur si ça t'intéresse.

Avec plaisir ! Love the project. I am not that Android-savvy, but glad to help as much as I can.