Chilkat HOME ASP Visual Basic VB.NET C# C C++ MFC Delphi FoxPro Java Perl Python Ruby SQL Server VBScript
File-to-File Character Encoding ConversionConvert a text file from one character encoding to another.
The source/destination charset may be any of the following:
The source/destination charset may be any of the following: us-ascii <?php $charset = new COM("Chilkat.Charset2"); // Any string argument automatically begins the 30-day trial. $success = $charset->UnlockComponent('30-day trial'); if ($success != true) { print $charset->lastErrorText() . "\n"; exit; } // Set the "To" and "From" character encodings: $charset->FromCharset = 'shift_JIS'; $charset->ToCharset = 'utf-8'; // To do file-to-file conversion, call ConvertFile. // The shift_JIS sample file is downloadable from this URL: // http://www.chilkatsoft.com/testData/japanese_shiftJis.txt $success = $charset->ConvertFile('japanese_shiftJis.txt','japanese_utf8.txt'); if ($success != true) { print $charset->lastErrorText() . "\n"; } else { print 'Success' . "\n"; } ?> |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.