Notepad prints by using the windows driver to format the printed image using the font specified and send that to the printer rather than text. (The driver will send text if the printer has a similar font, for speed).
php draw_text is sending the text bytes to the printer I presume. You need to send the text in the encoding of the character set of the printer. First make sure you have a printer with a chinese font. Then you need to find out the encoding it expects. The printer manual will tell you this and also tell you the commands to change the encodings, if it supports more than one. Not likely to be unicode, more likely to be big-5, etc. The commands are usually escape sequences, things like: escape, left-paren, "A". If you don't have a printer with the chinese character set then you should instead write to the windows driver and let it configure itself for the printer. Tex Texin Internationalization Architect, Yahoo! Inc. > -----Original Message----- > From: Nick Lee [mailto:[EMAIL PROTECTED] > Sent: Sunday, April 03, 2005 10:00 PM > To: php-i18n@lists.php.net > Subject: [PHP-I18N] Printing Chinese on Printer > > > Hi, > > I'm trying to print Chinese to a printer using PHP's > printer module (php_printer.dll). My platform is W2K, > English. I've printed Chinese successfully from > Notepad, so I know the printer can print Chinese. > > I send the bytes to the printer using > printer_draw_text(). The printer just intreprets the > bytes as ascii characters, and prints out a string of > those weird characters. I've used > mb_convert_encoding() to convert the string to UTF-8 > format before sending it to printer, but the result is > just another string of weird ascii characters. > > So, where is the problem? How do I force the printer > to interpret the bytes in another encoding? Or ... > should I convert the bytes into another encoding, such > as UTF-7, UTF-16, etc??????? > > Thanks in advance for any help, > Nick > > > ______________________________________________________________ > ________ > Post your free ad now! http://personals.yahoo.ca > > -- > PHP Internationalization Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP Internationalization Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php