Hi all,
I have a few questions about Unicode. I'm trying to put Japanese text into my game. Here's what I'm doing.
1. I create a text file with japanese text. I confirm the text by using a font like batang.ttf so I can see it in notepad. I then save it as UTF-8 format.
2. In my code I'm using the Big Endian code that Ziggy made to bring the file data in. It seems to be getting scrambled but I don't know why.
3. If I hardcode the data from the text file into my code it shows up correctly in the game without any problem, but somehow I'm scrambling it wrong.
So here's the questions:
1. What am I doing wrong with the Big Endian code? Or should I be using something else?
2. Is UTF-8 the correct format to save the file in?
Any other suggestions you guys might have would be appreciated.
Thanks
-Keith
I have a few questions about Unicode. I'm trying to put Japanese text into my game. Here's what I'm doing.
1. I create a text file with japanese text. I confirm the text by using a font like batang.ttf so I can see it in notepad. I then save it as UTF-8 format.
2. In my code I'm using the Big Endian code that Ziggy made to bring the file data in. It seems to be getting scrambled but I don't know why.
3. If I hardcode the data from the text file into my code it shows up correctly in the game without any problem, but somehow I'm scrambling it wrong.
So here's the questions:
1. What am I doing wrong with the Big Endian code? Or should I be using something else?
2. Is UTF-8 the correct format to save the file in?
Any other suggestions you guys might have would be appreciated.
Thanks
-Keith