Print Page | Close Window

problem with uploading

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=6196
Printed Date: 03 April 2026 at 11:29am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: problem with uploading
Posted By: fantasy
Subject: problem with uploading
Date Posted: 06 October 2003 at 6:32am
wwf 7.50 can put each user's uploads into seperate directories named after their own usernames ,but here i found one "error": if the username is not only in English ,such as  Chinese,the file(take image for example) cannt be displayed in the post. The file is already uploaded,but just cannt be displayed if the path contain other character sets such as Chinese.  How to fix it?

-------------
Welcome to my website:
PC Pioneer - the latest software news and forum site, Neowin in China!
"http://www.pcpchina.com" - http://www.pcpchina.com



Replies:
Posted By: WebWiz-Bruce
Date Posted: 06 October 2003 at 7:35am
You may need to edit the file functions_upload.asp to remove the making of folders.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: WebWiz-Bruce
Date Posted: 06 October 2003 at 7:44am
The forum uses the following function in the file functions_filters.asp to strip any non URL allowed charcaters:-

'******************************************
'***  Non-Alphanumeric Character Strip ****
'******************************************

'Function to strip non alphanumeric characters
Private Function characterStrip(strTextInput)

    'Dimension variable
    Dim intLoopCounter     'Holds the loop counter
   
    'Loop through the ASCII characters
    For intLoopCounter = 0 to 47
        strTextInput = Replace(strTextInput, CHR(intLoopCounter), "", 1, -1, 0)
    Next
   
    'Loop through the ASCII characters numeric characters to lower-case characters
    For intLoopCounter = 91 to 96
        strTextInput = Replace(strTextInput, CHR(intLoopCounter), "", 1, -1, 0)
    Next
   
    'Loop through the extended ASCII characters
    For intLoopCounter = 58 to 64
        strTextInput = Replace(strTextInput, CHR(intLoopCounter), "", 1, -1, 0)
    Next
   
    'Loop through the extended ASCII characters
    For intLoopCounter = 123 to 255
        strTextInput = Replace(strTextInput, CHR(intLoopCounter), "", 1, -1, 0)
    Next
   
   
    'Return the string
    characterStrip = strTextInput
   
End Function


I've marked the a number in red that could be increased to also strip Chineese charcaters as I don't know which part of the ASCII set they fall into as I was lead to believe that ACSCII only went to 255. If you can finout and let me know I will make the changes in teh code.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: fantasy
Date Posted: 06 October 2003 at 7:49am
thanks, boRg. Do you know the exact reason of this "error"? I wondered if I can replace the username with userid or usercode etc. I don't want to put images from all users simply in one folder.... btw,is that error really caused by the forum code? I paste the image URL to the address bar, and it failed to open the image ,too.But the image is there indeed...

-------------
Welcome to my website:
PC Pioneer - the latest software news and forum site, Neowin in China!
"http://www.pcpchina.com" - http://www.pcpchina.com


Posted By: WebWiz-Bruce
Date Posted: 06 October 2003 at 8:04am
You could use the user ID.

A URL link to a file, web page, iamge, etc. can only contain western characters to be valid. So the function I pasted above tries to remove any non-western characters but as I have no chinese cahracters to test with it's very difficult to write code that will also stip these types of characters, I imagine languages like russian maybe the same.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: WebWiz-Bruce
Date Posted: 06 October 2003 at 8:08am
Just one quick test, if you increase the number in the function I pasted into the other post to say 2000 does it strip chinese characters from the user name folders?


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: fantasy
Date Posted: 06 October 2003 at 11:14am

I have modified the number and changed it to 2000,but the problem still exists. Anyhow, there only can be 255 ASCII characters, in fact,one Chinese character was treated as a combination of two extend ASCII characters in Computer...

I noticed that despite I didn't change anything, the image can be displayed on my own machine(windows server 2003 simplified Chinese version with IIS 6.0);but everything goes bad when it was running on my site ISP's server.

So I consulted my ISP and they replied that the sever doesn't support the directory that contain Chinese characters very well... so I think this prob is "solved", I have to change username to userid or something else...

thanx,boRg



-------------
Welcome to my website:
PC Pioneer - the latest software news and forum site, Neowin in China!
"http://www.pcpchina.com" - http://www.pcpchina.com


Posted By: WebWiz-Bruce
Date Posted: 06 October 2003 at 11:20am
I also installed support for Chinese on my machine and found that once I had done that directories with Chinese characters worked sucessfully in my browser.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: fantasy
Date Posted: 06 October 2003 at 11:47am

en~ I have successfully modified the code and now the new folders are named after each member's userid.

 



-------------
Welcome to my website:
PC Pioneer - the latest software news and forum site, Neowin in China!
"http://www.pcpchina.com" - http://www.pcpchina.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net