Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I print Japanese text files on a non-Japanese PostScript printer from a system that doesn have Japanese locales installed?

0
10 Posted

How do I print Japanese text files on a non-Japanese PostScript printer from a system that doesn have Japanese locales installed?

0
10

In Solaris 7 and later, if any Unicode locales are installed on the system, such as en_US.UTF-8, you can print text files using the mp(1) program with the -L option. This creates a version of the contents in PostScript format and sends it to standard output. Convert the Japanese text to UTF-8 text using the iconv(1) utility, as follows: % iconv -f -t UTF-8 | /usr/bin/mp -L en_US.UTF-8 | lp – Though you said that no Japanese locales are installed, if either the Japanese EUC or PCK locale were installed on the system, you could directly print files to a non-Japanese printer using the -M option: % cat | /usr/bin/mp -L ja -M | lp – % cat | /usr/bin/mp -L ja_JP.PCK -M | lp – Note that the -M option was introduced in Solaris 9. Without this option, the PostScript file created by mp(1) would not include Japanese font glyph images.

Related Questions

Thanksgiving questions

*Sadly, we had to bring back ads too. Hopefully more targeted.