How to convert some multibyte characters into its numeric html entity using PHP?

前端 未结 3 1209
挽巷
挽巷 2021-01-03 12:20

Test string:

$s = \"convert this: \";
$s .= \"–, —, †, ‡, •, ≤, ≥, μ, ₪, ©, ® y ™, ⅓, ⅔, ⅛, ⅜, ⅝, ⅞, ™, Ω, ℮, ∑, ⌂, ♀, ♂ \";
$s .= \"but, not convert ordinar         


        
3条回答
  •  花落未央
    2021-01-03 13:11

    I did work on decoding ascii into html coded text (&#xxxx). https://github.com/hellonearthis/ascii2web

提交回复
热议问题