Sep 24, 2009, 6:58 AM
Post #1 of 1
I have a GDBM file that uses many non latin-1 characters in the keys such as:
setting binmode on GDBM file
2001 zhongguo niandu zuijia zhongpian xiaoshuo/中国作家协会
arbaah mahazot mekoriyim/שחם, נתן
buzay, shawqi/مرثية الغبار شعر
I do my assignment inside of an eval block. The $EVAL_ERROR string gets
the following typical error:
Wide character in null operation at load_fiction_keys.pl line 44, <STDIN> line 2072.
My proposed fix is to set the binmode of the undelying file to either :utf8 or :raw via binmode.
use encoding 'utf8';
set at the beginning of the program.
how do you set the binmode of the underlying file? or is there another way of accomplishing this?