Online sample of a CharSet property for conversion texts and files.

      This online sample demonstrates functionality of ByteArray class for conversion between several Codepages/CharSets. You can convert text or multibyte in any available code page to another code page or Unicode with this script.
      The Form.SizeLimit is 1000000bytes. Please, do not post more source data.

      Type some text to a textbox bellow Charset of this document and textbox is

      or select a file and its charset as a source data:

Select character set of the source file:
or custom charset

Select destination character set:

  Output data:
output to a textbox (as a string)
export to a file, filename:

     Note: The source file is handled as a text data with specified character set. The textbox is handled as a string data, default character set for the textbox is the same as a charset of this document.

     Change html charset (default character set for this document)

Another character set:

or try other custom charset (see ConvertCodePages):
  This charset is sent to a browser as a meta charset element of this HTML document and Content-Type: http header. Client browser handles the data from the source form as a string data encoded by document charset (utf-8 in the case of this document) and sends the data as a binary http stream to a web server. You can choose another character set for the conversion of the source text data (the textarea).
      You can use this script to do:
  • convert source files in any charset to a unicode utf-8 string
  • convert strings directly from HTML input and export them to a file.
  • prepared charsets: windows-1250,iso-8859-1,iso-8859-2,utf-8,utf-7,ibm852,shift_jis,iso-2022-jp, you can use any other charset from a ConvertCodePages list.

  •       This online sample charset converter uses WideCharToMultiByte and MultiByteToWideChar windows (Win32) functions used in the ByteArray class.
         The ByteArray class was primary designed to work with ASP and VBScript, but you can use it with any other language working with COM (ActiveX, OLE) objects, such is VBA (VBA5, VBA6, Word, Excel, MS Access), VBScript and JScript in windows scripting host (.wsh, .chm or .hta applications, Outlook or echange server-side scripts), VB.Net, C# or j# in ASP.Net and others.

          Another online samples (utilities, converting, upload)

          On-line base64 decoder and encoder - let's you convert text data and files from/to a Base64 string.
          Punycode/IDN decoder and encoder - online conversion between unicode (utf-8), punycode and IDNs (Internationalized Domain Names)
          URL Encoder, escape with charset conversion
          URL Decoder, unescape with charset conversion
          Online binary file to SQL field (HexString or base16) - let's you create an SQL statement to insert/update binary or a text file to a SQL database field. You can also create whole WSH (VBScript) to do the action.
          Online Codepage & Charset text and file converter - let's you convert text, html and files between many code pages.
          Live upload with progress sample - simple upload of files to ASP with progress bar.
          Live upload with image preview - Upload with many additional features: image preview, size preview and file type checking (before upload), server-side checking for file type, file contents, file size and upload size and more.
          IAF password recovery - Recovery passwords from your IAF File.
          Online IAF file generator - Create email account configuration file for Outlook express online.
          Online IAF decoder - Decode IAF configuration files online.
          Gmail pop and smtp configuration generator - Outlook config for Gmail.
          quoted-printable encoder online sample.
          quoted-printable decoder online sample.

          Related links

          ConvertCodePages list
          ScriptUtilities ByteArray class
          RFC 2279, UTF-8, a transformation format of ISO 10646
    © 1996 - 2017 Antonin Foller, Motobit Software, Notify me about changes.