Forums     Knowledge Base     OfficeWriter Online     
 
 
This documentation is for
OfficeWriter v3.7.1
ASP/COM Platform

View Docs for Another
Version or Platform

Programmer's Reference > ExcelTemplate > UnicodeToAnsi

UnicodeToAnsi Method

Syntax:

Public Function UnicodeToAnsi(Unicode As String, CodePage As Long) Ansi As String

Description:

To get a non-Latin alphabet string from a spreadsheet, and display the string correctly in the browser from a server running a language different from the language of the client's HTML page, you must:

  1. Set the ExcelWriter script's charset property to the string language's charset.
  2. Use the UnicodeToAnsi method to convert the string to an Ansi encoded string that can be displayed correctly to the user.

UnicodeToAnsi takes a Unicode string and the string language's code page and returns an Ansi string:

AnsiString = UnicodeToAnsi(UnicodeString, CodePage)

To correctly display strings in only one language, uses a specific language code page. To correctly display strings in any language, use code page 65001. For a complete list of charset and code page values see, Character Set Recognition.



Copyright 2006 © SoftArtisans, Inc. All Rights Reserved.