in reply to some questions on cgi.pm

If you're using CGI's document generating functions,

Use start_html's -dir => 'rtl' parameter to specify right-to-left direction.

Use header's -charset => '...' parameter to specify the character set. (In HTTP terms, encoding means something else, so I hope this is what you meant.)