CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
setting binmode on GDBM file

 



musterion
New User

Sep 24, 2009, 6:58 AM

Post #1 of 1 (1580 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?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives