Doesn't SQL_ReadResult support UTF8?
Does SQLX's SQL_ReadResult function not support UTF8?
Specifying utf8 in SQL_SetCharset does not apply to SQL_ReadResult. If there is a way to get a multi-byte string in SQL, please let me know. |
Re: Doesn't SQL_ReadResult support UTF8?
i have been using utf8mb4 for sql_setcharset and had no problems with database...maybe try that change and test?
|
Re: Doesn't SQL_ReadResult support UTF8?
I'm trying to output the Japanese stored in sqlite to the screen now.
There is no problem with DB, but the string read by SQL_ReadResult is garbled. I think it is SQL_ReadResult that has a problem because I confirmed that client_print and hudmessage can display Japanese. |
Re: Doesn't SQL_ReadResult support UTF8?
Are you able to see if any data is stored outside of the first byte with the UTF8 characters in your string?
Example: PHP Code:
Code:
[0][0][0][65] |
Re: Doesn't SQL_ReadResult support UTF8?
The resulting output looked like this.
Code:
[DEBUG]: [0][0][0][227] UTF8 (3byte) Code:
[[227][129][147]], [[227][130][147]], ... |
Re: Doesn't SQL_ReadResult support UTF8?
I was mistaken.
Close this thread, as client_print outputs no problem. The garbled text only occurs with HL's HudMessage, so the cause seems to be on the HudMessage side. https://github.com/ValveSoftware/halflife/issues/515 |
Re: Doesn't SQL_ReadResult support UTF8?
If read UTF-8 characters from the database, it seems that the characters cannot be displayed normally in the game.
Is there a solution? thanks. |
Re: Doesn't SQL_ReadResult support UTF8?
Show the code and output you are getting.
|
Re: Doesn't SQL_ReadResult support UTF8?
And what game are you trying to do it with?
It was HL1 that I had a problem with. |
Re: Doesn't SQL_ReadResult support UTF8?
Quote:
Quote:
Code:
new str[32] If read UTF-8 characters from the database, it seems that the characters cannot be displayed normally in the cstrike |
All times are GMT -4. The time now is 06:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.