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, "")