admin管理员组文章数量:1336204
So I've uploaded a game on itch.io. This is the link to the game in case anyone has to check it.
Inside the SETTINGS, there's an option to change the game language. The first time I uploaded it to itch.io, all the Japanese texts where broken, because of a bug known in Japanese as "mojibake": when the software doesn't know the right character-encoding of your text, it may show weird characters in its place instead.
Usually we fix this in webpages by adding a <meta charset="utf-8">
inside the HTML file, but since this didn't work for my Godot game, I've tried a fix suggested by this video and added a custom font project-wide (Project settings
> GUI
Themes
> Custom Fonts
); this time, the font can't deal with the accented Portuguese alfabets (such as á
and ê
).
I don't know why but this bug only affects the web export of the project, not the Android export (.apk) or the Windows export (.exe).
So what's the best approach to take here?
So I've uploaded a game on itch.io. This is the link to the game in case anyone has to check it.
Inside the SETTINGS, there's an option to change the game language. The first time I uploaded it to itch.io, all the Japanese texts where broken, because of a bug known in Japanese as "mojibake": when the software doesn't know the right character-encoding of your text, it may show weird characters in its place instead.
Usually we fix this in webpages by adding a <meta charset="utf-8">
inside the HTML file, but since this didn't work for my Godot game, I've tried a fix suggested by this video and added a custom font project-wide (Project settings
> GUI
Themes
> Custom Fonts
); this time, the font can't deal with the accented Portuguese alfabets (such as á
and ê
).
I don't know why but this bug only affects the web export of the project, not the Android export (.apk) or the Windows export (.exe).
So what's the best approach to take here?
Share Improve this question asked Nov 19, 2024 at 20:34 Gui ImamuraGui Imamura 72212 silver badges33 bronze badges 2 |1 Answer
Reset to default 0Someone else has suggested me (in the Japan Godot forum) to use a Google font, because it has both Japanese and accented alfabet character-sets. It fixed my bug. I would still accept another answer as the correct one if someone knows how to fix it without forcing the use of a specific font.
本文标签: godot4Encoding characters correctly in a Godot Project exported for WebStack Overflow
版权声明:本文标题:godot4 - Encoding characters correctly in a Godot Project exported for Web - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742399998a2467694.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
<meta charset...>
is specific to HTML 5, guaranteed by<!DOCTYPE HTML>
. – Joop Eggen Commented Nov 19, 2024 at 22:47