Unicode Help Needed

BlitzMax Forums/BlitzMax Programming/Unicode Help Needed

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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