PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: Default character set
Date: Nov 24 1997 8:49PM

Gerard J. van der Land wrote:
> 
> Michael,
> 
> We're using your Sybperl version 2.08_51 under Windows NT. It is working
> very well, 

Great!

Could you let me know the details of your installation, like which
version of NT, which C compiler, which version of Sybase? This will
make things easier for others...

>but we cannot get the following error to disappear:
> 
> Msg 2409, Level 11, State 2
> Line 1
>         Cannot find the requested character set in Syscharsets:  name =
> 'cp850'.
> 
> We want to use character set "iso_1", which is the default character set for
> the database. There are no problems when using Sybperl from Solaris 2.5 with
> the same Perl code. Apparently the default is set by the Sybase\DLL files
> (libcomn.dll or libsysdb.dll).
> 
> There is a function in DB-Library called dbsetdefcharset, but I noticed that
> Sybperl does not use or support it.

You can do two things - you can add the cp850 charset to syscharset
using sybinit on the server.

Or you can patch DBlib.xs and add dbsetdefcharset():

*** /tmp/geta1364	Mon Nov 24 12:47:29 1997
--- DBlib.xs	Mon Nov 24 12:47:25 1997
***************
*** 54,59 ****
--- 54,61 ----
  
  #if DBLIBVS < 1000
  #define dbsetversion(s)		not_here("dbsetversion")
+ #define dbsetdefcharset(s)	not_here("dbsetdefcharset")
+ #define dbsetdeflang(s)		not_here("dbsetdeflang")
  #if DBLIBVS < 461
  #define new_mnytochar(a, b, c)  not_here("new_mnytochar")
  #define new_mny4tochar(a,b,c)   not_here("new_mny4tochar")
***************
*** 4334,4339 ****
--- 4338,4352 ----
  char *
  dbversion()
  
+ int
+ dbsetdefcharset(char_set)
+ 	char *	char_set
+ 
+ int
+ dbsetdeflang(language)
+ 	char *	language
+ 
+ 
  void
  DBSETLCHARSET(char_set)
  	char *	char_set




-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler