03.03.2019, 11:10
Hi.
I'm experiencing some really weird R41-4 SQL Revision charset issue.
So years ago, when I used to use R39, everything was fine, but since the update (Honestly I'm writing a new gamemode from stratch) I wasn't able to fix it. I checked every single thread, but none of them solved my issue so far.
Here are couple of pictures in regard of the issue.
Keep that in mind, that these are Hungarian characters (цьуőъ. ЦЬУŐЪ, бй, БЙ, etc)
When I execute a specific function, which loads all the rows from a table, printing their received values, this is what I receive:
Link: https://prnt.sc/mskbkj
As you can see, instead of printing the őъъ characters, it's printing a questionmark instead of them.
Table structure: https://prnt.sc/mskcq6
utf8_hungarian_ci charset (for the hungarian ЦЬУŐЪ, etc chars)
Actual database charset: https://prnt.sc/mskd14
Everything works all fine on the UCP, but not on PAWN side ...
Things I have already tried:
1.) Setting up mysql_charset("UTF-8"); during the SQL connection establishing process.
2.) Changing back the SQL column charset back to the normal one (latin1_swe)
If anybody could help me figure out this issue, I'd be more than grateful ...
Cheers.
I'm experiencing some really weird R41-4 SQL Revision charset issue.
So years ago, when I used to use R39, everything was fine, but since the update (Honestly I'm writing a new gamemode from stratch) I wasn't able to fix it. I checked every single thread, but none of them solved my issue so far.
Here are couple of pictures in regard of the issue.
Keep that in mind, that these are Hungarian characters (цьуőъ. ЦЬУŐЪ, бй, БЙ, etc)
When I execute a specific function, which loads all the rows from a table, printing their received values, this is what I receive:
Link: https://prnt.sc/mskbkj
As you can see, instead of printing the őъъ characters, it's printing a questionmark instead of them.
PHP код:
function LoadItems() {
new i=-1;
for(;++i<MAX_ITEMS;) {
for(new ItemEnum:e; e < ItemEnum; ++e) ItemInfo[i][e] = 0;
ItemInfo[i][ItemType] = ItemTypes:0;
}
mysql_format(g_SQL, sql, sizeof sql, "SELECT * FROM `item-list`");
inline LoadItemsInline() {
if(!cache_num_rows()) return printf("No rows!");
i=-1;
new idx;
printf("Printing these characters from PAWN: цьуőъű ЦЬУŐЪŰ");
for(;++i<cache_num_rows();) {
cache_get_value_int(i, "id", ItemInfo[idx][ItemID]);
cache_get_value_int(i, "ItemType", _:ItemInfo[idx][ItemType]);
cache_get_value_int(i, "weaponId", ItemInfo[idx][ItemWeaponId]);
cache_get_value_int(i, "ItemProtected", ItemInfo[idx][ItemProtected]);
cache_get_value_int(i, "ItemObjectID", ItemInfo[idx][ItemObjectID]);
cache_get_value(i, "ItemName", ItemInfo[idx][ItemName], 32);
printf("String Charset Check: %s", ItemInfo[idx][ItemName]);
Iter_Add(Item, idx);
++idx;
}
}
mysql_pquery_inline(g_SQL, sql, using inline LoadItemsInline, "");
return 1;
}
utf8_hungarian_ci charset (for the hungarian ЦЬУŐЪ, etc chars)
Actual database charset: https://prnt.sc/mskd14
Everything works all fine on the UCP, but not on PAWN side ...
Things I have already tried:
1.) Setting up mysql_charset("UTF-8"); during the SQL connection establishing process.
2.) Changing back the SQL column charset back to the normal one (latin1_swe)
If anybody could help me figure out this issue, I'd be more than grateful ...
Cheers.