Register - Login
Views: 99393331
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-24-22 10:24:14 AM
Jul - Meta - RPG + UTF-8 = � New poll - New thread - New reply
Next newer thread | Next older thread
RanAS
Member
Level: 55


Posts: 486/844
EXP: 1286472
For next: 27717

Since: 10-10-14

From: São Paulo, Brazil

Since last post: 1 day
Last activity: 1 day

Posted on 10-26-18 09:05:45 AM Link | Quote

I mean, there's not much that can be done to fix it because of the font used, but it's still a bit funny to look at it.

Also it doesn't look like Jul has been updating its code along with the GitHub repository since March 3rd for some reason?
Xkeeper

Level: 263


Posts: 23358/25343
EXP: 296722324
For next: 2238129

Since: 07-03-07

Pronouns: they/them/????????

Since last post: 9 days
Last activity: 3 days

Posted on 10-26-18 02:39:34 PM Link | Quote
I have a few suspicions for why the latter is true...


For the font, you're right, though in theory there's something that could be done to display Unicode — mostly just using a font that supports its glyphs instead of the image-based font.



____________________
(Lv 244 with 229510017 EXP)
Arisotura
Member
Level: 49


Posts: 507/614
EXP: 880012
For next: 3871

Since: 02-24-13

From: your dreams

Since last post: 93 days
Last activity: 51 days

Posted on 12-10-18 12:11:37 PM Link | Quote
indeed.

K64 has a halfhearted fix in place for that. UTF8 characters display as a [?] placeholder, which is not too useful but somewhat better than 㤲àéè garbage.


// halfassed UTF8 support

// uh, we don't have UTF8 shit in font.png...

function strlen_utf8($str)
{
$ret = 0;
$len = strlen($str)
for ($i = 0; $i < $len; )
{
$c = ord($str[$i++])
$ret++;

if ($c & 0x80)
{
$c &= 0xFC;
while ($c & 0x40)
{
$c <<= 1;
$i++;
}
}
}

return $ret;
}

function twrite_utf8($font,$x,$y,$l,$text)
{
global $img;
$x*=8;
$y*=8;
$text.='';
$len = strlen_utf8($text)
if($len<$l) $x+=($l-$len)*8;
$len = strlen($text)
$pos = 0;
for($i=0;$i<$len;)
{
$c = ord($text[$i++])

if ($c & 0x80)
{
if (!($c & 0x3C))
{
$c2 = ord($text[$i++])
$c = ($c2 & 0x3F) | (($c & 0x03) << 6)
}
else
{
$c &= 0xFC;
while ($c & 0x40)
{
$c <<= 1;
$i++;
}
$c = 0x7F;
}
}

ImageCopy($img,$font,$pos*8+$x,$y,($c&0xF)*8,($c>>4)*8,8,8)
$pos++;
}
}


probably could have used mb_strlen() instead of coding my own, but eh

____________________
Kuribo64 - melonDS
Next newer thread | Next older thread
Jul - Meta - RPG + UTF-8 = � New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

27 database queries.
Query execution time:  0.080374 seconds
Script execution time:  0.007157 seconds
Total render time:  0.087531 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 119 column 11 - Warning: <form> isn't allowed in <table> elements
line 118 column 10 - Info: <table> previously mentioned
line 120 column 11 - Warning: missing <tr>
line 120 column 119 - Warning: missing </font> before </td>
line 124 column 16 - Warning: plain text isn't allowed in <tr> elements
line 120 column 11 - Info: <tr> previously mentioned
line 125 column 68 - Warning: missing </nobr> before </td>
line 141 column 68 - Warning: missing </nobr> before <tr>
line 147 column 35 - Warning: missing <tr>
line 147 column 50 - Warning: missing </font> before </td>
line 148 column 37 - Warning: unescaped & or unknown entity "&id"
line 147 column 168 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 91 - Warning: missing </font> before </table>
line 156 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 158 column 9 - Warning: missing <tr>
line 176 column 13 - Warning: missing <tr>
line 177 column 102 - Warning: unescaped & or unknown entity "&postid"
line 185 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 187 column 9 - Warning: missing <tr>
line 205 column 13 - Warning: missing <tr>
line 206 column 102 - Warning: unescaped & or unknown entity "&postid"
line 208 column 74 - Warning: <style> isn't allowed in <td> elements
line 208 column 9 - Info: <td> previously mentioned
line 216 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 218 column 9 - Warning: missing <tr>
line 236 column 13 - Warning: missing <tr>
line 237 column 102 - Warning: unescaped & or unknown entity "&postid"
line 239 column 74 - Warning: <style> isn't allowed in <td> elements
line 239 column 9 - Info: <td> previously mentioned
line 302 column 3246 - Warning: unescaped & or unknown entity "&0xF"
line 309 column 17 - Warning: missing <tr>
line 309 column 17 - Warning: discarding unexpected <table>
line 312 column 35 - Warning: missing <tr>
line 312 column 50 - Warning: missing </font> before </td>
line 312 column 91 - Warning: missing </font> before </table>
line 314 column 35 - Warning: missing <tr>
line 314 column 50 - Warning: missing </font> before </td>
line 315 column 37 - Warning: unescaped & or unknown entity "&id"
line 314 column 168 - Warning: missing </font> before </table>
line 316 column 17 - Warning: discarding unexpected </textarea>
line 316 column 28 - Warning: discarding unexpected </form>
line 316 column 35 - Warning: discarding unexpected </embed>
line 316 column 43 - Warning: discarding unexpected </noembed>
line 316 column 53 - Warning: discarding unexpected </noscript>
line 316 column 64 - Warning: discarding unexpected </noembed>
line 316 column 74 - Warning: discarding unexpected </embed>
line 316 column 82 - Warning: discarding unexpected </table>
line 316 column 90 - Warning: discarding unexpected </table>
line 318 column 9 - Warning: missing </font> before <table>
line 330 column 25 - Warning: discarding unexpected </font>
line 339 column 37 - Warning: discarding unexpected </font>
line 317 column 1 - Warning: missing </center>
line 120 column 63 - Warning: <img> lacks "alt" attribute
line 125 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 125 column 93 - Warning: <img> lacks "alt" attribute
line 141 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 141 column 98 - Warning: <img> lacks "alt" attribute
line 148 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 246 - Warning: <img> proprietary attribute value "absmiddle"
line 161 column 22 - Warning: <img> lacks "alt" attribute
line 161 column 63 - Warning: <img> lacks "alt" attribute
line 161 column 112 - Warning: <img> lacks "alt" attribute
line 161 column 162 - Warning: <img> lacks "alt" attribute
line 162 column 11 - Warning: <img> lacks "alt" attribute
line 172 column 15 - Warning: <img> lacks "alt" attribute
line 179 column 74 - Warning: <img> lacks "alt" attribute
line 190 column 23 - Warning: <img> lacks "alt" attribute
line 190 column 64 - Warning: <img> lacks "alt" attribute
line 190 column 113 - Warning: <img> lacks "alt" attribute
line 190 column 163 - Warning: <img> lacks "alt" attribute
line 191 column 11 - Warning: <img> lacks "alt" attribute
line 201 column 15 - Warning: <img> lacks "alt" attribute
line 221 column 22 - Warning: <img> lacks "alt" attribute
line 221 column 63 - Warning: <img> lacks "alt" attribute
line 221 column 112 - Warning: <img> lacks "alt" attribute
line 221 column 161 - Warning: <img> lacks "alt" attribute
line 222 column 11 - Warning: <img> lacks "alt" attribute
line 232 column 15 - Warning: <img> lacks "alt" attribute
line 315 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 315 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 315 column 246 - Warning: <img> proprietary attribute value "absmiddle"
line 324 column 25 - Warning: <img> lacks "alt" attribute
line 329 column 267 - Warning: <img> lacks "alt" attribute
line 149 column 50 - Warning: trimming empty <font>
line 309 column 17 - Warning: trimming empty <tr>
line 312 column 50 - Warning: trimming empty <font>
line 125 column 68 - Warning: <nobr> is not approved by W3C
line 141 column 68 - Warning: <nobr> is not approved by W3C
line 177 column 27 - Warning: <nobr> is not approved by W3C
line 206 column 27 - Warning: <nobr> is not approved by W3C
line 237 column 27 - Warning: <nobr> is not approved by W3C
Info: Document content looks like HTML5
Info: No system identifier in emitted doctype
Tidy found 91 warnings and 0 errors!


The alt attribute should be used to give a short description
of an image; longer descriptions should be given with the
longdesc attribute which takes a URL linked to the description.
These measures are needed for people using non-graphical browsers.

For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain
compared with using <FONT> elements.

You are recommended to use CSS to control line wrapping.
Use "white-space: nowrap" to inhibit wrapping in place
of inserting <NOBR>...</NOBR> into the markup.

About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium

Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md