Net-Z3950-DBIServer

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	- Hashes in the configuration file do not introduce comments
	  if immediately preceded by a backslash, but become simple
	  slashes.  This provides a means of embedded hashes in
	  strings.
	- Add fulltext support for Oracle, using CONTAINS.
	- NOTE INCOMPATIBLE CHANGE: fulltext searching is now used
	  only when attribute 3=3 (position=any position in field) is
	  supplied.
	- Add make-pdf.sh to generate zSQLgate-manual.pdf
	- New configuraton-file directive: "option NAME = VALUE", can
	  be used so set for example "option "mysql_enable_utf8" = 1"

1.04  [UNKOWN DATE]
	- Unknown features -- probably a subset of those listed for
	  v1.05.

1.03  Fri May 16 17:44:49 BST 2008
	- Books example expanded to use three-level inner join, using
	  correct configuration syntax with each auxiliary table
	  specified separately.
	- Restructure directories.

README.UTF8-FIX  view on Meta::CPAN

Content-Transfer-Encoding: binary
Content-Type: text/plain; charset="windows-1251"




I've found the solution on this issue. Look into comments on this page: 
http://dev.mysql.com/doc/refman/5.0/en/charset-general.html
I've just tested it and adding one of these lines has resolved the
encoding problem:  - $dbh->do("SET character_set_results='utf8'");  - my
$dbh = DBI->connect($dsn, $user, $pass, {mysql_enable_utf8 => 1});  - $dbh->prepare("SET
NAMES 'utf8'")->execute();
So, the problem is with Perl - MySQL communication through DBD:MySQL.
I'm not sure for now if this is universal one and if it is needed to add
to the major version.

Anyway thanks for your responses and of course for the whole module.
>


> I guess I would start at the bottom of the stack and work up.  So:

README.UTF8-FIX  view on Meta::CPAN


    <div>
      I've just tested it and adding one of these lines has resolved the encoding problem:
    </div>

    <div>
      &#160;-&#160;<span style="font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 23px; text-align: -webkit-auto;">$dbh-&gt;do("SET character_set_results='utf8'");</span>
    </div>

    <div>
      <span style="font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 23px; text-align: -webkit-auto;">&#160;-&#160;</span><span style="font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 23px; text-align: -...
    </div>

    <div>
      <span style="font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 23px; text-align: -webkit-auto;">&#160;-&#160;</span><span style="font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 23px; text-align: -...
    </div>

    <div>
      <br>

      <div>

examples/books/books.nzd  view on Meta::CPAN

# file's format, if you need it.  But it's actually pretty obvious.
#
# To use the an-yet uninstalled distribution, invoke as:
#	perl -I ../../lib ../../bin/zSQLgate books.nzd @:9998

datasource = "DBI:mysql:dbname=books"		# If using MySQL
#datasource = "DBI:Pg:dbname=books"		# If using PostgreSQL
#datasource = "dbi:Oracle:host=test;sid=test"	# If using Oracle
#username = "mike"				# If needed
#password = "mike3636"				# If needed
option "mysql_enable_utf8" = 1

database "places" {
    table = "country"
    search attrset bib1 {
	access 12 = "id"			# local number
	access 4 = "name"			# title
    }
    data format xml {
	record = "country"
	field "countryId" = "id"

lib/Net/Z3950/DBIServer.pm  view on Meta::CPAN

	    }
	}
    }

    ### We'd prefer to report a connect() error politely to the
    #	client, but SimpleServer doesn't seem to have a way to do this
    #	yet.  You can pass an error code but no addInfo.


    # I can't imagine why this isn't the default
    #$this->{dbh}->{'mysql_enable_utf8'} = 1;
    warn "UTF8='" . $this->{dbh}->{'mysql_enable_utf8'} . "'";
}


sub search_handler {
    my $args = shift();

    warn "in search_handler()\n";
    eval {
	_real_search_handler($args, @_);
    }; if ($@ && ref $@ && $@->isa('Net::Z3950::DBIServer::Exception')) {



( run in 0.300 second using v1.01-cache-2.11-cpan-1dc43b0fbd2 )