Closed ESK0 closed 2 days ago
This seems to be a MariaDB bug that was fixed at some point - couldn't find when exactly, but after 11.1.
Since I select grades as a JSON value, the query is more like:
SELECT JSON_ARRAYAGG(ox_group_grades.label) AS grades FROM ox_group_grades WHERE `group` = 'czech'
MariaDB 11.4 is the current LTS and the problem is not present there.
Here's the relevant issue.
I was running MariaDB 11.1 and I can confirm updating to 11.4+ solved the issue.
Hey there,
after few a days I noticed that the fix with updating the mariadb server only fixed the issue while querying with a external software. Initially I only checked this with a Datagrip
Unfortunately the server still got the text with incorrect encoding.
Printing 'raw' grades before JSON parse
Running latest ox_core version
PS: I've tried to query the same in Lua with using oxmysql and it works just fine:
I take it as a L... I uploaded the the new build to a different server folder
Even after updating the core correctly (using the correct server directory -_-) The issue with encoding is still there... No issues in Datagrip but ox_core is fucked.. Are you using any options in a connection string? I tried setting charset: 'utf8mb4' but no luck there..
@antond15 Could you please try this at your machine tomorrow? I may look dumb but this is weird AF as issue only exists with ox_core using mariadb but not with oxmysql using mysql2..
Are you using any options in a connection string
Nothing outside of user:password/database
.
Are you using any options in a connection string
Nothing outside of
user:password/database
.
Today afternoon I tried a fresh db with a ox_core recipe and it indeed works as expected...
Hi,
our grade roles contains special characters and ox_core selects them incorrectly from DB. I tried to play with Connection options but without any luck:
Used characters as a group grade label: á, č, ď, é, ě, í, ň, ó, ř, š, ť, ú, ů, ý, ž
Output: "�, č, ď, �, ě, �, ň, �, ř, š, ť, �, ů, �, ž"
Our database and table is correctly configured to use utf8mb4_unicode
When querying label manually everything is selected correctly
ox_core version: 0.31.1 PS: Back in the times of Lua ox_core we didn't have any issues.
PS2: Apparently its only issue with group grades