This is based on the original question answered in:
Original solution works great, but now need some tweaking:
$mystring =~ s/(([\x00-\x7F]|[\x80-\xff
In the above example, a double-byte Chinese character is treated as 2 characters.
Now $mystring also contain a mix of HTML Entity elements, such as Japanese character: の
I would like to treat the HTML Entity element as 2 characters as well, how can integrate it into the above regular expression?