DBM_Filter::encode — filter for DBM_Filter
| Use Case | Command | Description |
|---|---|---|
| Apply encoding filter to a tied hash | $db->Filter_Push('encode' => 'UTF-8') |
Set encoding for all keys/values stored in the DBM file |
| Specify a character encoding | $db->Filter_Push('encode' => 'iso-8859-16') |
Use a specific encoding from the Encode module |
| Check if encoding is valid | use Encode; Encode::find_encoding('NAME') |
Verify that an encoding name is supported before applying |
use SDBM_File; # or DB_File, GDBM_File, NDBM_File, ODBM_File
use DBM_Filter ;
$db = tie %hash, ...
$db->Filter_Push('encode' => 'iso-8859-16');
This DBM filter allows you to choose the character encoding that will be stored in the DBM file. The usage is
$db->Filter_Push('encode' => ENCODING);
where ENCODING must be a valid encoding name that the Encode module recognises.
A fatal error will be thrown if:
Encode module is not available.Encode module.DBM_Filter, perldbmfilter, Encode
Paul Marquess pmqs AT cpan.org
Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-22 05:26 @216.73.216.206
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)