VBScript/ASP URLEncode function with charset (urlencode to utf-8 or other character encoding)
Batch charset conversion - convert all .txt files in a folder from ibm-850 unicode utf-8 This sample contains short algorithm to convert more files (all files in one folder) from one character set to another. The sample works for any code page (unicode utf-8 -> shift-jis, windows-1250 -> utf-8, ..) and shorter files, the files are converted in memory and there is no good idea to use it for files over 100MB. (See Charset conversion of very large files - 2GB and more).
Batch file conversion - character set and BOM detection of html files This sample can do batch conversion of text files with different code pages - Unicode, utf-8, windows-1250 and others to one selected code page. The algorithm contains simple detection of source file code page using BOM.
You can choose any destination charset. See also ByteArray - save unicode data (string) as utf-8 with BOM to save files with BOM (unicode Little/Big, utf-8)
ASP gigabyte download - download over 2GB, 4GB, very large/huge files. ASP/VBScript source code to download of very large files using ASP. The download size is not limited by 2GB or 4GB of size, you can download files with any size, 10th of gigabytes or more.
The sample uses Response.BinaryWrite. Remember that IIS6 has a strong memory leak, so this code does not work with Windows 2003 SP1, you need Windows 2003 SP2 at least. The code works also with other versions of IIS (IIS1-5, IIS7) See also
Experience high memory usage in the W3wp.exe process
Memory leaks may occur when the BinaryWrite method is called
Several browsers (IE, Firefox) or http clients (winhttp) has a download size limit of 2GB or 4GB. See http download over 2GB, 4GB - browser and server behavior
ByteArray - Store data with another charset (ibm850) to a database This sample works with a text data column in a database with any character set. For example, if you work with utf-8 in ASP, but you need to store data as an ibm850 charset in a database. If you have next table:
CREATE TABLE [dbo].[textTable] ( [textColumn] [VARCHAR] (250) COLLATE SQL_AltDiction_CP850_CI_AI NULL ) ON [PRIMARY]but your ASP will work with utf-8, you need a binary conversion between utf-8 and ibm850.
| Accept application/x-www-form-urlencoded in unicode utf-8 |
|---|
|
This sample demontrates accepting of a plain form (Form without ENCTYPE="multipart/form-data") by Huge-ASP file upload, ASPForm Object. Full source is in form-url-encode-utf-8.asp sample file.
|
Jump to: Image files | Compressed files | Archive files | Executable files | Miscellaneous files
| File type | Typical extension |
Hex digits xx = variable |
Ascii digits . = not an ascii char |
|---|---|---|---|
| Bitmap format | .bmp | 42 4d | BM |
| FITS format | .fits | 53 49 4d 50 4c 45 | SIMPLE |
| GIF format | .gif | 47 49 46 38 | GIF8 |
| Graphics Kernel System | .gks | 47 4b 53 4d | GKSM |
| IRIS rgb format | .rgb | 01 da | .. |
| ITC (CMU WM) format | .itc | f1 00 40 bb | .... |
| JPEG File Interchange Format | .jpg | ff d8 ff e0 | .... |
| NIFF (Navy TIFF) | .nif | 49 49 4e 31 | IIN1 |
| PM format | .pm | 56 49 45 57 | VIEW |
| PNG format | .png | 89 50 4e 47 | .PNG |
| Postscript format | .[e]ps | 25 21 | %! |
| Sun Rasterfile | .ras | 59 a6 6a 95 | Y.j. |
| Targa format | .tga | xx xx xx | ... |
| TIFF format (Motorola - big endian) | .tif | 4d 4d 00 2a | MM.* |
| TIFF format (Intel - little endian) | .tif | 49 49 2a 00 | II*. |
| X11 Bitmap format | .xbm | xx xx | |
| XCF Gimp file structure | .xcf | 67 69 6d 70 20 78 63 66 20 76 | gimp xcf |
| Xfig format | .fig | 23 46 49 47 | #FIG |
| XPM format | .xpm | 2f 2a 20 58 50 4d 20 2a 2f | /* XPM */ |
| File type | Typical extension |
Hex digits xx = variable |
Ascii digits . = not an ascii char |
|---|---|---|---|
| Bzip | .bz | 42 5a | BZ |
| Compress | .Z | 1f 9d | .. |
| gzip format | .gz | 1f 8b | .. |
| pkzip format | .zip | 50 4b 03 04 | PK.. |
| File type | Typical extension |
Hex digits xx = variable |
Ascii digits . = not an ascii char |
|---|---|---|---|
| TAR (pre-POSIX) | .tar | xx xx | (a filename) |
| TAR (POSIX) | .tar | 75 73 74 61 72 | ustar (offset by 257 bytes) |
| File type | Typical extension |
Hex digits xx = variable |
Ascii digits . = not an ascii char |
|---|---|---|---|
| MS-DOS, OS/2 or MS Windows | 4d 5a | MZ | |
| Unix elf | 7f 45 4c 46 | .ELF |
| File type | Typical extension |
Hex digits xx = variable |
Ascii digits . = not an ascii char |
|---|---|---|---|
| pgp public ring | 99 00 | .. | |
| pgp security ring | 95 01 | .. | |
| pgp security ring | 95 00 | .. | |
| pgp encrypted data | a6 00 | ¦. |
© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz