Dini я symbol
#1

Hello all. I created save system with dini for my house system. The house owner is saved successfully, but when it load the owner, appear the symbol " я ". Here is my code to save:
dini_Set(biz, "Owner", HouseInfo[houseid][hOwner]);
Here is my code for loading:
format(HouseInfo[houseid][hOwner], MAX_PLAYER_NAME, dini_Get(housestring, "Owner"));
BTW I'm using the last version of Dini (1.6).

And this is a very big problem because when the server is looking for the owner, it does not find it.
Reply
#2

Well I don't think dini supports non-english chars, you should switch or write your code in english.
Reply
#3

Quote:
Originally Posted by Cadilab
Посмотреть сообщение
Well I don't think dini supports non-english chars, you should switch or write your code in english.
It's in english.
Reply
#4

Quote:
Originally Posted by Cadilab
Посмотреть сообщение
Well I don't think dini supports non-english chars, you should switch or write your code in english.
I don't think that is the point here - he probably meant that after reading a Username, the only output is that symbol.


Random signs usually come up when writing or reading strings the wrong way. Or when trying to format a number into a string (eg when using %s in format, but passing a number/character).

I guess other values get read correctly the same way?
Because that code as such seems correct (maybe a bit inefficient to use format there). The only question I have is if "housestring" really contains the filename, or is it a buffer for something else?
Reply
#5

Quote:
Originally Posted by Kraeror
Посмотреть сообщение
BTW I'm using the last version of Dini (1.6).
From 2008! Seriously, there are far, far better methods available nowadays. Start using them.
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
From 2008! Seriously, there are far, far better methods available nowadays. Start using them.
I know only how it works. Can you give me
the latest and the best method you think?
Reply
#7

Quote:
Originally Posted by NaS
Посмотреть сообщение
I don't think that is the point here - he probably meant that after reading a Username, the only output is that symbol.


Random signs usually come up when writing or reading strings the wrong way. Or when trying to format a number into a string (eg when using %s in format, but passing a number/character).

I guess other values get read correctly the same way?
Because that code as such seems correct (maybe a bit inefficient to use format there). The only question I have is if "housestring" really contains the filename, or is it a buffer for something else?
Yes here is a housestring filename:
Quote:

new housestring[64];
format(housestring, sizeof(housestring), "/Houses/%d.dini.save", houseid);
if(dini_Exists(housestring))
{
//...
}

Reply
#8

I didn't understand the question at first, but also I can't give you the proper answer due the lack of code.
Usually this happens when you try to pass uni chars into an ascii write operation, in ascii я is usually at the end.

I mean you can try and fix this, when writing a file, add \n at the first insert line, it should fix it, but my suggestion would be, if you wish to stay with files, to migrate to y_ini or eventually mysql, dini was released back in 2006 that was like 11 years ago, I didn't think people still use it.
Reply
#9

Quote:
Originally Posted by Cadilab
Посмотреть сообщение
I didn't understand the question at first, but also I can't give you the proper answer due the lack of code.
Usually this happens when you try to pass uni chars into an ascii write operation, in ascii я is usually at the end.

I mean you can try and fix this, when writing a file, add \n at the first insert line, it should fix it, but my suggestion would be, if you wish to stay with files, to migrate to y_ini or eventually mysql, dini was released back in 2006 that was like 11 years ago, I didn't think people still use it.
Where can I add \n. I didn't understand you. Can you give me a code?
Reply
#10

I can't give you no code when you didn't provide it for us.
Can you please go to Scriptfiles/Houses/ and open one ini file and paste it here just so I can see what you have written in it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)