Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Akow, 1 invisible), 1,417 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Unicode issue [Re: Quad] #229881
10/01/08 09:52
10/01/08 09:52
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
Thanks Quadraxax. I tried it and I get the same result, it doesn't work.

Re: Unicode issue [Re: DavidLancaster] #229883
10/01/08 11:17
10/01/08 11:17
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Just an idea, didn't test it:
What, if you use "file_asc_read" instead of "file_str_read", and then "str_for_asc"?

Re: Unicode issue [Re: Pappenheimer] #229901
10/01/08 13:38
10/01/08 13:38
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
Thanks Pappenheimer.

file_asc_read (handle)
Reads a byte (0..255) out of the file with the given handle

The problem with that is that unicode fonts extent past 255 bytes.

Re: Unicode issue [Re: DavidLancaster] #229924
10/01/08 15:55
10/01/08 15:55
Joined: Jul 2006
Posts: 40
North Europe
D
DeepReflection Offline
Newbie
DeepReflection  Offline
Newbie
D

Joined: Jul 2006
Posts: 40
North Europe
@ David Yes, and No! the binary representation in the text file, I'm pretty sure still will be in some byte/char/8bit length, the problem is how this is encoded. As fast as there are string/char functions and so on involved You must know how it was implemented. I was tempted to make a hasty comment, but the sanity hold me off, and I locked UTF up a bit on Wikipedia UTF crazy It's a "bit" complicated, least to say.

As a fast and dirty trick, I would open up your text file with a HEX editor of some kind, try other applications like Wordpad or MS Office, Open Office, Google translator function on Internet usw. Check the differences and or put these different code into your test for GameStudio until it gets right. Then you know at least what application you have to use to create textfiles for the game.

Your example reminds me when I tried to translate a Japanese text file, I had to try out some applications before the cut and pasted text was considered anything else then (/%&&/%¤"#% by Google translator. smile


Whoever has the gold makes the rules.
Re: Unicode issue [Re: DeepReflection] #229925
10/01/08 16:17
10/01/08 16:17
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
that could be indeed a problem.

Most windows applications save textfiles with ISO-8859-1 or ANSI encoding, perhaps what the engine needs is a file with UTF-8 encoding(preferably without signature). Have you tried re-saving the file in notepad by selecting UTF-8 encoding?

Or maybe even the other way around, I dont recall how it was exactly right now. In any case, it couldn't hurt to try different file encodings.


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: Unicode issue [Re: Michael_Schwarz] #230079
10/02/08 17:20
10/02/08 17:20
Joined: May 2008
Posts: 123
B
BES Offline OP
Member
BES  Offline OP
Member
B

Joined: May 2008
Posts: 123
David, I know that Dreamweaver saves documents in UTF-8 format. Perhaps you can use that text editor to get the properly formatted document.

Re: Unicode issue [Re: BES] #230089
10/02/08 18:08
10/02/08 18:08
Joined: May 2008
Posts: 123
B
BES Offline OP
Member
BES  Offline OP
Member
B

Joined: May 2008
Posts: 123
This is Mark @ Brethren- tried saving the file as UTF-8 and using a unicode font in A7, but no go. I have a few words in japanese and a few in english and the english displays fine, but not the japanese. I've tried it with only japanese too, though it shouldn't matter, and it's still garbled. Simon thinks that the engine is only grabbing a byte at a time when rendering instead of double byte (which is consistent since the garbled japanese is twice as many characters as the input japanese text). Really curious how others got the text to display in the screenshots above!

Re: Unicode issue [Re: BES] #230152
10/03/08 09:41
10/03/08 09:41
Joined: Sep 2007
Posts: 158
Guangzhou China
bomber Offline
Member
bomber  Offline
Member

Joined: Sep 2007
Posts: 158
Guangzhou China
I'm not sure why ur having this problem, this is the code in my game(it has Chinese in it)
string strChat0[1000];
string strChat1[1000];
string strChat2[1000];
string strChat3[1000];
string strChat4[1000];
string strChat5[1000];
string strChat6[1000];
string strChat7[1000];
string strChat8[1000];
font newfont4me = "Arial",1,20;
text txtChat
{
pos_x = 680;
pos_y = 500;
layer = 30;
strings = 9;
font newfont4me;
flags=visible;
string = strChat8, strChat7, strChat6, strChat5, strChat4,
strChat3, strChat2, strChat1, strChat0;
red=255;
blue=0;
green=0;
}
But it works just fine maybe it's cause I have a Chinese version of Windows^

Last edited by bomber; 10/03/08 09:43.

"I don't know what the facts are but somebody's certainly going to sit down with him and find out what he knows that they may not know, and make sure he knows what they know that he may not know."
————Donald Rumfeld
Re: Unicode issue [Re: bomber] #230562
10/06/08 18:25
10/06/08 18:25
Joined: May 2008
Posts: 123
B
BES Offline OP
Member
BES  Offline OP
Member
B

Joined: May 2008
Posts: 123
Thanks so much for the reply bomber! Are you loading your text from an external file, or are you able to type in Chinese strings in SED with the Chinese version of windows?

Re: Unicode issue [Re: Quad] #230744
10/08/08 08:39
10/08/08 08:39
Joined: Oct 2008
Posts: 1
L
learner Offline
Guest
learner  Offline
Guest
L

Joined: Oct 2008
Posts: 1
I am sorry that I am new to 3DGS.

My problem is that when I type the Chinese characters using MS IDE, it turns into some strange symbols when executing. I have set the default to the Chinese character. When I type, I can see the Chinese displayed properly. The problem only occurs when I run the script.

What do I need to do? Do I need to define the Chinese font? Id so, can you show me an example?

Many thanks.

Page 2 of 3 1 2 3

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1