I have a plain text file in my resources folder, I use Resources.Load and cast it to a TextAsset, and for some reason all of the quotations marks in this document disappear. Any ideas on why that would be??
1 Answer
1Well, I’m not sure what characters you used in the file, but they aren’t ASCII quotation marks. All plain text editors i have can’t display them. normal quotation marks have an ASCII code of 34(dec) or 22(hex). Your characters are 93(hex) and 94(hex) (147 / 148 dec) which aren’t part of plain ascii.
txt files usually only contain ascii characters. If you want to include other unicode characters you have to use a different encoding when you save the file. utf8 for example is the most common encoding.
We need some more info: - How do you read the TextAsset (code?) - How can you tell the qutation marks are gone? (code?) - What kind of quoration marks are you talking about (" or ')? (sample file?)
– Bunny83ok, here is how I load the file. When I print it out I can see that the quotations are gone, they are double quotations. I will attach the file here.[9586-genesis1.txt|9586] fileContent = (TextAsset)Resources.Load("file.txt"); print (word.text); string content = fileContent.text;
– filler03