Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Rick Berger <rberger at info dot load-otea dot hrdc-drhc dot gc dot ca>
Subject: reading CP850 characters
Date: Aug 3 1999 11:13PM


I new at using sybperl  and Sybase, so I hope you will bare with me.

I trying to fix a Perl cgi script that's talking to a Sybase SQL Anywhere
server which has its Character Code Page set to CP850. I am able to catch 
all the lower case French accented characters as unique values and
translate them into their ISO_8859-1 values for presentation to the web
browser. The problem is with the upper case French accented characters,
most of them come through mapped to a `?', hex 0x3f.

I noticed also when I look at the tables with isql that the lower case
characters that are unique symbols but the upper case are still `?'s. But
if I use isql with `-J cp850' all the character show up alright, upper and
lower case. Now, so I can get unique values for translating all accented
characters, is there a way to tell Sybase::Ctlib that the characters are
coming through as CP850 by setting the CS_SYB_SET property?  If anyone can
tell me if and how this can be done I'd sure appreciate it.

The script uses the following to connect to the database:

	%configInfo = readConfig($config_file_location);

	$dbh = Sybase::CTlib->ct_connect($configInfo{'username'},

Oh it is not my server and System have other application tied in to it so
they're not willing to change it's character code page. 

Rick Berger (819) 953-7019,
Applications Designer
Labour Operations Application Development
Human Resources Development Canada