Converts the Chinese portion of the UTF8 encoded URL (< 0xFFFF).
function Chinesefromutf8url (STRUTF8)
{
var BSTR = "";
var noffset = 0; Processing point on StrUtf8
function UnicodeFromUtf8 (STRUTF8)
{
var BSTR = "";
var ntotalchars = strutf8.length; Total chars to be processed.
var noffset = 0; Processing point on StrUtf8
var nremainingbytes = Ntotalchars; How many bytes left to be converted
var noutputposition = 0;
var icode, ICode1, ICode2; The value of the Unicode.
while (Noffset < ntotalchars)
{
Icode = Strutf8.charcodeat (Noffset);
if ((Icode & 0x80) = = 0)//1 byte.
{
if (Nremainingbytes < 1)//Not enough data
Break
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.