unityscript - How to load TextAsset from txt file containing extended ASCII characters in Unity? -


in case specifically, have bullet-points (• or #149) in text file.
if copy paste "•" unity text field in editor, shows up, pretty sure bullet-point lost in reading process. (i checked in debug mode, , indeed bullet-point lost @ reading).

this how read in text file textasset:

textasset content = resources.load(slidemanager.slidelanguage+"\\"+filename+" ("+slidemanager.slidenumber+")") textasset;  

it turns out, way read fine. reads file correctly, encoding of file ascii, therefore resource loader cannot interpret none ascii characters, , drops them.

thus, since bullet-point not standard ascii, extended ascii character, have specify encoding of text files.
example, set encoding utf-8, , work.

i used notepad++ set encoding, sure there many other ways can it.

to set encoding in notepad++

  • click on tab named encoding (fifth tab left on top default), , select convert utf-8.

Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -