
musterion
New User
Sep 24, 2009, 6:58 AM
Post #1 of 1
(2606 views)
|
setting binmode on GDBM file
|
Can't Post
|
|
I have a GDBM file that uses many non latin-1 characters in the keys such as: 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. I have 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?
|