From e0bc6988221506400e8cdcc3af6e663173be476f Mon Sep 17 00:00:00 2001 From: yancend Date: Tue, 24 Dec 2013 16:10:41 +0800 Subject: [PATCH] =?UTF-8?q?asp=20=E4=BF=AE=E6=94=B9=E4=B9=B1=E7=A0=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- asp/Uploader.Class.asp | 6 +++--- asp/json.asp | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/asp/Uploader.Class.asp b/asp/Uploader.Class.asp index 1e83728f4..5848863f9 100644 --- a/asp/Uploader.Class.asp +++ b/asp/Uploader.Class.asp @@ -23,8 +23,8 @@ Class Uploader cfgSavePath = "upload/" Set stateString = Server.CreateObject("Scripting.Dictionary") - stateString.Add "SIZE_LIMIT_EXCCEED", "文件大小超过服务器限制" - stateString.Add "TYPE_NOW_ALLOW", "文件类型不允许" + stateString.Add "SIZE_LIMIT_EXCCEED", "File size exceeded!" + stateString.Add "TYPE_NOW_ALLOW", "File type not allowed!" End Sub Public Property Let MaxSize(ByVal size) @@ -202,7 +202,7 @@ Class Uploader Private Function GetSaveName( ByVal filename ) Dim format, ext, name - If rsFormValues <> Null Then + If Not IsEmpty( rsFormValues ) Then format = rsFormValues.Item( "fileNameFormat" ) Else format = "{yyyy}{mm}{dd}{hh}{ii}{ss}{rand:6}" diff --git a/asp/json.asp b/asp/json.asp index d3cf70660..080bdc64c 100644 --- a/asp/json.asp +++ b/asp/json.asp @@ -83,7 +83,15 @@ Class jsCore haystack(i) = Mid(str, i + 1, 1) charcode = AscW(haystack(i)) And 65535 - + If charcode < 127 Then + If Not IsEmpty(charmap(charcode)) Then + haystack(i) = charmap(charcode) + ElseIf charcode < 32 Then + haystack(i) = "\u" & Right("000" & Hex(charcode), 4) + End If + Else + haystack(i) = "\u" & Right("000" & Hex(charcode), 4) + End If Next jsEncode = Join(haystack, "")