[7.64] UTF related issue - 21/02/21 05:33 PM
Again, another issue that's been more noticable since upgrading to 7.64.
For a while now, I've been puzzled as to why searching for certain Japanese words (/g, /jisho, etc.) would point me to page with gibberish.
I believe there's a weird inconsistancy in isalpha and isalnum when it comes to certain UTF characters.
For example: 語 is considered by mIRC to be an alpha character, yet ご is not.
For a while now, I've been puzzled as to why searching for certain Japanese words (/g, /jisho, etc.) would point me to page with gibberish.
I believe there's a weird inconsistancy in isalpha and isalnum when it comes to certain UTF characters.
For example: 語 is considered by mIRC to be an alpha character, yet ご is not.
Code
jisho { url -a $+(http://jisho.org/,$iif($1-,$+(search/,$htmlhex($v1)))) } htmlhex { if ($1-) { var %i = 1, %x while (%i <= $len($1-)) { if ($mid($1-,%i,1) isalnum) { var %x = %x $+ $v1 } else { var %x = %x $+ $chr(37) $+ $base($asc($mid($1-,%i,1)),10,16,2) } inc %i } return %x } } ; $htmlhex(日本語!) -> 日本語%21 ; $htmlhex(にほんご) -> %306B%307B%3093%3054 (however this pointed me to the above image)