Result:
found more than 953 distributions - search limited to the first 2001 files matching your query ( run in 0.708 )


Cucumber-Messages

 view release on metacpan or  search on metacpan

lib/Cucumber/Messages.pm  view on Meta::CPAN


=head4 body

*
 The body of the attachment. If `contentEncoding` is `IDENTITY`, the attachment
 is simply the string. If it's `BASE64`, the string should be Base64 decoded to
 obtain the attachment.
=cut

has body =>
    (is => 'ro',

lib/Cucumber/Messages.pm  view on Meta::CPAN



=head4 content_encoding

*
 Whether to interpret `body` "as-is" (IDENTITY) or if it needs to be Base64-decoded (BASE64).

 Content encoding is *not* determined by the media type, but rather by the type
 of the object being attached:

 - string: IDENTITY

 view all matches for this distribution


Cwd-utf8

 view release on metacpan or  search on metacpan

t/cwd.t  view on Meta::CPAN


# Check utf8 and non-utf8 results
sub check_dirs {
    my ($test, $utf8, $non_utf8) = @_;
    my $utf8_encoded     = encode_utf8($utf8);
    my $non_utf8_decoded = decode_utf8($non_utf8, FB_CROAK | LEAVE_SRC);

    plan tests => 3;

    like $utf8 => qr/\/$unicode_dir$/, "$test found correct dir";
    is   $utf8_encoded => $non_utf8,   "$test encoded utf8 dir matches non-utf8";
    is   $utf8 => $non_utf8_decoded,   "$test utf8 dir matches decoded non-utf8";
}

plan tests => 9;

use Cwd;

 view all matches for this distribution


D

 view release on metacpan or  search on metacpan

lib/D.pm  view on Meta::CPAN

  use utf8;
  
  # Export du, dw, de, dn, dustr, dwstr, destr, dnstr functions
  use D;
  
  # Reference data that contains decoded strings
  my $data = [{name => 'あ'}, {name => 'い'}];
  
  # Encode all strings in reference data to UTF-8 and dump the reference data to STDERR.
  du $data;

 view all matches for this distribution


DAPNET-API

 view release on metacpan or  search on metacpan

lib/DAPNET/API.pm  view on Meta::CPAN

        my($res) = $ua->request($req);
        print('Request status line: '.$res->status_line."\n") if($self->{DEBUG}) ;
        if (!$res->is_success) {
            return($res->status_line);
        };
        print('JSON Response: '.$res->decoded_content."\n") if($self->{DEBUG});
        $self->{_JSONRESPONSEREF} = $jsonresobj->decode($res->decoded_content);
    } else {
        while (my $substr = substr($text,0,(76 - $self->{_CALL_LEN}),'')) {
            if ($i == 1) {
                print("substr begining: $substr \n") if($self->{DEBUG});
                $json = $self->_json_individual_call($self->{CALLSIGN}.':'.$substr.'...',$to,$txgroup,$emergency);

lib/DAPNET/API.pm  view on Meta::CPAN

            my($res) = $ua->request($req);
            print('Request status line: '.$res->status_line."\n") if($self->{DEBUG});
            if (!$res->is_success) {
               return($res->status_line);
           };
           print('JSON Response: '.$res->decoded_content."\n") if($self->{DEBUG});
           $self->{_JSONRESPONSEREF} = $jsonresobj->decode($res->decoded_content);
    
            $i++;
        };
    
    };

lib/DAPNET/API.pm  view on Meta::CPAN

        my($res) = $ua->request($req);
        print('Request status line: '.$res->status_line."\n") if($self->{DEBUG});
        if (!$res->is_success) {
            return($res->status_line);
        };
        print('JSON Response: '.$res->decoded_content."\n") if($self->{DEBUG});
        $self->{_JSONRESPONSEREF} = $jsonresobj->decode($res->decoded_content);
        
    } else {
        while (my $substr = substr($text,0,(76 - $self->{_CALL_LEN}),'')) {
            if ($i == 1) {
                print("substr begining: $substr \n") if($self->{DEBUG});

lib/DAPNET/API.pm  view on Meta::CPAN

            my($res) = $ua->request($req);
            print('Request status line: '.$res->status_line."\n") if($self->{DEBUG});
            if (!$res->is_success) {
               return($res->status_line);
           };
            print('JSON Response: '.$res->decoded_content."\n") if($self->{DEBUG});
            $self->{_JSONRESPONSEREF} = $jsonresobj->decode($res->decoded_content);

            $i++;
        };
    
    };

 view all matches for this distribution


DB-CouchDB-Schema

 view release on metacpan or  search on metacpan

lib/DB/CouchDB.pm  view on Meta::CPAN

    my $req     = HTTP::Request->new($method, $uri);
    $req->content(Encode::encode('utf8', $content));
         
    my $ua = LWP::UserAgent->new();
    my $return = $ua->request($req);
    my $response = $return->decoded_content({
		default_charset => 'utf8'
    });
    my $decoded;
    eval {
        $decoded = $self->json()->decode($response);
    };
    if ($@) {
        return {error => $return->code, reason => $response}; 
    }
    return $decoded;
}

package DB::CouchDB::Iter;

sub new {

 view all matches for this distribution


DB-Object

 view release on metacpan or  search on metacpan

lib/DB/Object.pm  view on Meta::CPAN


If the parameter property I<uri> was provided of if the environment variable C<DB_CON_URI> is set, it will use this connection uri to get the necessary connection parameters values.

An L<URI> could be C<http://localhost:5432?database=somedb> or C<file:/foo/bar?opt={"RaiseError":true}>

Alternatively, if the connection parameter I<conf_file> is provided then its json content will be read and decoded into an hash reference.

The following keys can be used in the json data in the I<conf_file>: C<database>, C<login>, C<passwd>, C<host>, C<port>, C<driver>, C<schema>, C<opt>

The port can be specified in the I<host> parameter by separating it with a semicolon such as C<localhost:5432>

 view all matches for this distribution


DB2-Admin

 view release on metacpan or  search on metacpan

lib/DB2/Admin.pm  view on Meta::CPAN


=head2 GetSnapshot

This method performs a database snapshot and returns the collected
snapshot data.  It can collect data in one or more monitoring areas,
then returns a hash reference with decoded snapshot results.

This method takes the following named parameters, of which only
C<Subject> is required:

=over 4

 view all matches for this distribution


DBD-Amazon

 view release on metacpan or  search on metacpan

lib/SQL/Amazon/Request/Request.pm  view on Meta::CPAN


			my $resp = $obj->{_lwp}->post($url_roots{$obj->{_locale}}, $url_params);
	
			if ($dbgname && (! -e $dbgname)) {
				open(XMLF, ">$dbgname") || die $!;
				print XMLF $resp->decoded_content;
				close XMLF;
			}
		
			$obj->{_errstr} = 'Amazon ECS request failed: Unknown reason.',
			return undef
				unless $resp;

			$obj->{_errstr} = 'Amazon ECS request failed: ' . $resp->status_line,
			return undef
				unless $resp->is_success;
			$xml = XMLin($resp->decoded_content);
		}
	
		$obj->{_errstr} = 'Unable to parse Amazon ECS response.',
		return undef 
			unless $xml;

 view all matches for this distribution


DBD-Firebird

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

 * fix compiler warnings:
  + use printf formats matching the arguments
  + use 0 instead of NULL where an integer is expected
  + allocate XSQLDA as char array
  + fix conversion of decimal(x,y) to string
 * use the decoded milliseconds when formatting times (also fixes a warning)
 * do not link with libdl.so on linux
 * fix joined lines in reserved words list
 * add new keywords for Firebird 2.5 (part of #12)
 * Removed restrictions on distribution
 * Readme cleanup

 view all matches for this distribution


DBD-JDBC

 view release on metacpan or  search on metacpan

lib/DBD/JDBC.pm  view on Meta::CPAN

        my ($self, $ber, $arg) = @_;
        
        my ($ber2, $tag, $i, $field);
        $self->unpack($ber, \$ber2);
        
        # This value indicates whether or not there's a row to be decoded.
        $ber2->decode(INTEGER => \$i);
        push @$arg, $i;    
        
        if ($i) {
            # tag() will return undef when the end of the buffer is reached

 view all matches for this distribution


DBD-MariaDB

 view release on metacpan or  search on metacpan

Changes.historic  view on Meta::CPAN

   (https://github.com/perl5-dbi/DBD-mysql/pull/76)

2016-12-12 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.041_1)
* Unicode fixes: when using mysql_enable_utf8 or mysql_enable_utf8mb4,
  previous versions of DBD::mysql did not properly encode input statements
  to UTF-8 and retrieved columns were always UTF-8 decoded regardless of the
  column charset.
  Fix by Pali Rohár.
  Reported and feedback on fix by Marc Lehmann
  (https://rt.cpan.org/Public/Bug/Display.html?id=87428)
  Also, the UTF-8 flag was not set for decoded data:
  (https://rt.cpan.org/Public/Bug/Display.html?id=53130)
* Return INTs with ZEROFILL as strings. Reported by Knarf, fix by Pali Rohár.
  (https://rt.cpan.org/Public/Bug/Display.html?id=118977)

2016-11-28 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.041)

 view all matches for this distribution


DBD-ODBC

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    data was in, in the database. This was inconvenient and arguably a
    mistake. Columns like nchar/nvarchar etc were bound as SQL_WCHAR and
    returned as Unicode. This release changes the behaviour in a unicode
    build of DBD::ODBC to bind all char columns as SQL_WCHAR. This may
    inconvenience a few people who expected 8bit chars back, knew the
    char set and decoded them (sorry). See odbc_old_unicode to return
    to old behaviour.

  [ENHANCEMENTS]

  * added -w option to Makefile.PL to add "-Wall" to CCFLAGS and

 view all matches for this distribution


DBD-Oracle

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


   - OCI_THREADED setting had been accidentally removed, causing potential
    crashes when using threads. (RT#92229, Martin J. Evans, reported
    by Detlef Lütticke)

  - When using fetch*_hashref the values are decoded but
    not the keys so if you have unicode column names they were not
    returned correctly.  (RT#92134, Martin J. Evans, reported by
    Marcel Montes)


 view all matches for this distribution


DBD-SQLcipher

 view release on metacpan or  search on metacpan

sqlite3.c  view on Meta::CPAN

#define PTF_LEAF      0x08

/*
** As each page of the file is loaded into memory, an instance of the following
** structure is appended and initialized to zero.  This structure stores
** information about the page that is decoded from the raw file page.
**
** The pParent field points back to the parent page.  This allows us to
** walk up the BTree from any leaf to the root.  Care must be taken to
** unref() the parent page pointer when this page is no longer referenced.
** The pageDestructor() routine handles that chore.

sqlite3.c  view on Meta::CPAN

}

/*
** Given the nKey-byte encoding of a record in pKey[], populate the 
** UnpackedRecord structure indicated by the fourth argument with the
** contents of the decoded record.
*/ 
SQLITE_PRIVATE void sqlite3VdbeRecordUnpack(
  KeyInfo *pKeyInfo,     /* Information about the record format */
  int nKey,              /* Size of the binary record */
  const void *pKey,      /* The binary record */

sqlite3.c  view on Meta::CPAN

  BtCursor *pCrsr;   /* The BTree cursor */
  u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
  int len;           /* The length of the serialized data for the column */
  int i;             /* Loop counter */
  Mem *pDest;        /* Where to write the extracted value */
  Mem sMem;          /* For storing the record being decoded */
  const u8 *zData;   /* Part of the record being decoded */
  const u8 *zHdr;    /* Next unparsed byte of the header */
  const u8 *zEndHdr; /* Pointer to first byte after the header */
  u32 offset;        /* Offset into the data */
  u32 szField;       /* Number of bytes in the content of a field */
  u32 avail;         /* Number of bytes of available data */

sqlite3.c  view on Meta::CPAN

** Attempt the transfer optimization on INSERTs of the form
**
**     INSERT INTO tab1 SELECT * FROM tab2;
**
** The xfer optimization transfers raw records from tab2 over to tab1.  
** Columns are not decoded and reassembled, which greatly improves
** performance.  Raw index records are transferred in the same way.
**
** The xfer optimization is only attempted if tab1 and tab2 are compatible.
** There are lots of rules for determining compatibility - see comments
** embedded in the code for details.

sqlite3.c  view on Meta::CPAN

/*
** Convert raw bits from the on-disk RTree record into a coordinate value.
** The on-disk format is big-endian and needs to be converted for little-
** endian platforms.  The on-disk record stores integer coordinates if
** eInt is true and it stores 32-bit floating point records if eInt is
** false.  a[] is the four bytes of the on-disk record to be decoded.
** Store the results in "r".
**
** There are three versions of this macro, one each for little-endian and
** big-endian processors and a third generic implementation.  The endian-
** specific implementations are much faster and are preferred if the

sqlite3.c  view on Meta::CPAN

** implementation will only be used if this module is compiled as part
** of the amalgamation.
*/
#if defined(SQLITE_BYTEORDER) && SQLITE_BYTEORDER==1234
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    memcpy(&c.u,a,4);                                           \
    c.u = ((c.u>>24)&0xff)|((c.u>>8)&0xff00)|                   \
          ((c.u&0xff)<<24)|((c.u&0xff00)<<8);                   \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#elif defined(SQLITE_BYTEORDER) && SQLITE_BYTEORDER==4321
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    memcpy(&c.u,a,4);                                           \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#else
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    c.u = ((u32)a[0]<<24) + ((u32)a[1]<<16)                     \
           +((u32)a[2]<<8) + a[3];                              \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#endif

 view all matches for this distribution


DBD-SQLeet

 view release on metacpan or  search on metacpan

sqlite3.c  view on Meta::CPAN

** the last integer which is specified by three characters.  The meaning
** of a four-character format specifiers ABCD is:
**
**    A:   number of digits to convert.  Always "2" or "4".
**    B:   minimum value.  Always "0" or "1".
**    C:   maximum value, decoded as:
**           a:  12
**           b:  14
**           c:  24
**           d:  31
**           e:  59

sqlite3.c  view on Meta::CPAN

}

/*
** Given the nKey-byte encoding of a record in pKey[], populate the 
** UnpackedRecord structure indicated by the fourth argument with the
** contents of the decoded record.
*/ 
SQLITE_PRIVATE void sqlite3VdbeRecordUnpack(
  KeyInfo *pKeyInfo,     /* Information about the record format */
  int nKey,              /* Size of the binary record */
  const void *pKey,      /* The binary record */

sqlite3.c  view on Meta::CPAN

  BtCursor *pCrsr;   /* The BTree cursor */
  u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
  int len;           /* The length of the serialized data for the column */
  int i;             /* Loop counter */
  Mem *pDest;        /* Where to write the extracted value */
  Mem sMem;          /* For storing the record being decoded */
  const u8 *zData;   /* Part of the record being decoded */
  const u8 *zHdr;    /* Next unparsed byte of the header */
  const u8 *zEndHdr; /* Pointer to first byte after the header */
  u64 offset64;      /* 64-bit offset */
  u32 t;             /* A type code from the record header */
  Mem *pReg;         /* PseudoTable input register */

sqlite3.c  view on Meta::CPAN

**
** P2 is a register that holds the name of a virtual table in database 
** P1. Call the xCreate method for that table.
*/
case OP_VCreate: {
  Mem sMem;          /* For storing the record being decoded */
  const char *zTab;  /* Name of the virtual table */

  memset(&sMem, 0, sizeof(sMem));
  sMem.db = db;
  /* Because P2 is always a static string, it is impossible for the

sqlite3.c  view on Meta::CPAN

** Attempt the transfer optimization on INSERTs of the form
**
**     INSERT INTO tab1 SELECT * FROM tab2;
**
** The xfer optimization transfers raw records from tab2 over to tab1.  
** Columns are not decoded and reassembled, which greatly improves
** performance.  Raw index records are transferred in the same way.
**
** The xfer optimization is only attempted if tab1 and tab2 are compatible.
** There are lots of rules for determining compatibility - see comments
** embedded in the code for details.

sqlite3.c  view on Meta::CPAN

/*
** Convert raw bits from the on-disk RTree record into a coordinate value.
** The on-disk format is big-endian and needs to be converted for little-
** endian platforms.  The on-disk record stores integer coordinates if
** eInt is true and it stores 32-bit floating point records if eInt is
** false.  a[] is the four bytes of the on-disk record to be decoded.
** Store the results in "r".
**
** There are five versions of this macro.  The last one is generic.  The
** other four are various architectures-specific optimizations.
*/
#if SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    c.u = _byteswap_ulong(*(u32*)a);                            \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    c.u = __builtin_bswap32(*(u32*)a);                          \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#elif SQLITE_BYTEORDER==1234
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    memcpy(&c.u,a,4);                                           \
    c.u = ((c.u>>24)&0xff)|((c.u>>8)&0xff00)|                   \
          ((c.u&0xff)<<24)|((c.u&0xff00)<<8);                   \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#elif SQLITE_BYTEORDER==4321
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    memcpy(&c.u,a,4);                                           \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#else
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    c.u = ((u32)a[0]<<24) + ((u32)a[1]<<16)                     \
           +((u32)a[2]<<8) + a[3];                              \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#endif

sqlite3.c  view on Meta::CPAN

static void fts5DecodeFunction(
  sqlite3_context *pCtx,          /* Function call context */
  int nArg,                       /* Number of args (always 2) */
  sqlite3_value **apVal           /* Function arguments */
){
  i64 iRowid;                     /* Rowid for record being decoded */
  int iSegid,iHeight,iPgno,bDlidx;/* Rowid components */
  const u8 *aBlob; int n;         /* Record to decode */
  u8 *a = 0;
  Fts5Buffer s;                   /* Build up text to return here */
  int rc = SQLITE_OK;             /* Return code */

 view all matches for this distribution


DBD-SQLite-Amalgamation

 view release on metacpan or  search on metacpan

sqlite-amalgamation.c  view on Meta::CPAN

#define PTF_LEAF      0x08

/*
** As each page of the file is loaded into memory, an instance of the following
** structure is appended and initialized to zero.  This structure stores
** information about the page that is decoded from the raw file page.
**
** The pParent field points back to the parent page.  This allows us to
** walk up the BTree from any leaf to the root.  Care must be taken to
** unref() the parent page pointer when this page is no longer referenced.
** The pageDestructor() routine handles that chore.

sqlite-amalgamation.c  view on Meta::CPAN

  u32 *aType;        /* aType[i] holds the numeric type of the i-th column */
  u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
  u32 nField;        /* number of fields in the record */
  int len;           /* The length of the serialized data for the column */
  int i;             /* Loop counter */
  char *zData;       /* Part of the record being decoded */
  Mem *pDest;        /* Where to write the extracted value */
  Mem sMem;          /* For storing the record being decoded */

  sMem.flags = 0;
  sMem.db = 0;
  sMem.zMalloc = 0;
  assert( p1<p->nCursor );

sqlite-amalgamation.c  view on Meta::CPAN

**
**    (6)  The SELECT statement is a simple (not a compound) select that
**         contains only tab2 in its FROM clause
**
** This method for implementing the INSERT transfers raw records from
** tab2 over to tab1.  The columns are not decoded.  Raw records from
** the indices of tab2 are transfered to tab1 as well.  In so doing,
** the resulting tab1 has much less fragmentation.
**
** This routine returns TRUE if the optimization is attempted.  If any
** of the conditions above fail so that the optimization should not

sqlite-amalgamation.c  view on Meta::CPAN

static void dlrDestroy(DLReader *pReader){
  SCRAMBLE(pReader);
}

#ifndef NDEBUG
/* Verify that the doclist can be validly decoded.  Also returns the
** last docid found because it is convenient in other assertions for
** DLWriter.
*/
static void docListValidate(DocListType iType, const char *pData, int nData,
                            sqlite_int64 *pLastDocid){

sqlite-amalgamation.c  view on Meta::CPAN

** case the first item would be delta-encoded.
**
** iLastDocid is the final docid in the doclist in pData.  It is
** needed to create the new iPrevDocid for future delta-encoding.  The
** code could decode the passed doclist to recreate iLastDocid, but
** the only current user (docListMerge) already has decoded this
** information.
*/
/* TODO(shess) This has become just a helper for docListMerge.
** Consider a refactor to make this cleaner.
*/

sqlite-amalgamation.c  view on Meta::CPAN

}

/*******************************************************************/
/* PLReader is used to read data from a document's position list.  As
** the caller steps through the list, data is cached so that varints
** only need to be decoded once.
**
** plrInit, plrDestroy - create/destroy a reader.
** plrColumn, plrPosition, plrStartOffset, plrEndOffset - accessors
** plrAtEnd - at end of stream, only call plrDestroy once true.
** plrStep - step to the next element.

 view all matches for this distribution


DBD-SQLite

 view release on metacpan or  search on metacpan

lib/DBD/SQLite.pm  view on Meta::CPAN

binary data, pre-encoded UTF-8 strings, etc.

=item * DBD_SQLITE_STRING_MODE_UNICODE_FALLBACK: All Perl strings are encoded
to UTF-8 before being given to SQLite. Perl will B<try> to decode SQLite
strings as UTF-8 when giving them to Perl. Should any such string not be
valid UTF-8, a warning is thrown, and the string is left undecoded.

This is appropriate for strings that are decoded to characters via,
e.g., L<Encode/decode>.

Also note that, due to some bizarreness in SQLite's type system (see
L<https://www.sqlite.org/datatype3.html>), if you want to retain
blob-style behavior for B<some> columns under DBD_SQLITE_STRING_MODE_UNICODE_FALLBACK

lib/DBD/SQLite.pm  view on Meta::CPAN

  SELECT * FROM foo ORDER BY name COLLATE perllocale

=head2 Unicode handling

Depending on the C<< $dbh->{sqlite_string_mode} >> value, strings coming
from the database and passed to the collation function may be decoded as
UTF-8. This only works, though, if the C<sqlite_string_mode> attribute is
set B<before> the first call to a perl collation sequence. The recommended
way to activate unicode is to set C<sqlite_string_mode> at connection time:

  my $dbh = DBI->connect(

 view all matches for this distribution


DBD-SQLite2

 view release on metacpan or  search on metacpan

dbdimp.c  view on Meta::CPAN

    for (i = 0; i < numFields; i++) {
        char *val = imp_sth->results[i];
        /* warn("fetching: %d == %s\n", i, val); */
        if (val != NULL) {
            size_t len = strlen(val);
            char *decoded;
            if (chopBlanks) {
                val = savepv(val);
                while(len > 0 && val[len-1] == ' ') {
                    len--;
                }
                val[len] = '\0';
            }
            decoded = sqlite2_decode(imp_dbh, val, &len);
            sv_setpvn(AvARRAY(av)[i], decoded, len);
            Safefree(decoded);
            if (chopBlanks) Safefree(val);

            /* if (!imp_dbh->no_utf8_flag) {
            sv_utf8_encode(AvARRAY(av)[i]);
            } */

 view all matches for this distribution


DBD-XBase

 view release on metacpan or  search on metacpan

lib/XBase/Index.pm  view on Meta::CPAN


(this -type option may not work with all index formats at the moment
-- will be fixed and patches always welcome).

You can use C<-ddebug> option to indexdump to see how pages are
fetched and decoded, or run debugger to see the calls and parsing.

=head2 Using the index files to speed up searches in dbf

The syntax for using the index files to access data in the dbf file is
generally

 view all matches for this distribution


DBD-cubrid

 view release on metacpan or  search on metacpan

cci-src/src/cci/cci_handle_mng.c  view on Meta::CPAN

      for (i = 0; i < fetched_tuple; i++)
	{
#if defined(WINDOWS)
	  for (j = 0; j < req_handle->num_col_info; j++)
	    {
	      FREE_MEM (req_handle->tuple_value[i].decoded_ptr[j]);
	    }

	  FREE_MEM (req_handle->tuple_value[i].decoded_ptr);
#endif
	  FREE_MEM (req_handle->tuple_value[i].column_ptr);
	}
      FREE_MEM (req_handle->tuple_value);
    }

 view all matches for this distribution


DBD-mysql

 view release on metacpan or  search on metacpan

lib/DBD/mysql.pm  view on Meta::CPAN

  $sth->bind_param(2, $byte_param, DBI::SQL_BINARY); # set correct binary type

  $sth->execute();

  my $output = $sth->fetchall_arrayref();
  # returned data in $output reference should be already UTF-8 decoded as appropriate

=item mysql_enable_utf8mb4

This is similar to mysql_enable_utf8, but is capable of handling 4-byte
UTF-8 characters.

 view all matches for this distribution


DBGp-Client

 view release on metacpan or  search on metacpan

lib/DBGp/Client/Response.pod  view on Meta::CPAN


=item type

=item content

decoded content

=back

=head2 notify

lib/DBGp/Client/Response.pod  view on Meta::CPAN


It always returns C<0> unless C<children> is true

=item value

The decoded value of scalar properties (typically useful when
C<children> is false).

=item childs

Array of C<DBGp::Client::Response::Property> objects. Returns an empty

 view all matches for this distribution


DBI

 view release on metacpan or  search on metacpan

ex/unicode_test.pl  view on Meta::CPAN


# NOTE: some DBs may uppercase table names
sub find_table {
    my ($h, $table) = @_;

    # won't find a match if the returned data is not utf8 decoded
    my $s = $h->table_info(undef, undef, undef, 'TABLE');
    my $r = $s->fetchall_arrayref;
    my $found = first { $_->[2] =~ /$table/i} @$r;
    ok($found, 'unicode table found in unqualified table_info');

    SKIP: {
          skip "table found via table_info", 1 if $found;

          $found = first { Encode::decode_utf8($_->[2]) =~ /$table/i} @$r;
          ok(!$found, "Table not found initially but when table name decoded it was found as $table");
    };
    my $found_some_utf8_tables;
    foreach ($r) {
        $found_some_utf8_tables++ if Encode::is_utf8($_->[2]);
    }

 view all matches for this distribution


DBIx-Class-EncodeColumns

 view release on metacpan or  search on metacpan

lib/DBIx/Class/EncodeColumns.pm  view on Meta::CPAN

=head1 METHODS

=head2 decode_columns($encoding)

Use this function to set the default encoding of all your columns.
The data of all columns will be decoded to internal encoding of perl.

=cut

=head2 encode_columns($encoding)

 view all matches for this distribution


DBIx-Class

 view release on metacpan or  search on metacpan

lib/DBIx/Class/UTF8Columns.pm  view on Meta::CPAN

    $self->next::method( $column, $value );

    return $copy || $value;
}

# override this if you want to force everything to be encoded/decoded
sub _is_utf8_column {
  # my ($self, $col) = @_;
  return ($_[0]->utf8_columns || {})->{$_[1]};
}

 view all matches for this distribution


DBIx-Oracle-Unwrap

 view release on metacpan or  search on metacpan

lib/DBIx/Oracle/Unwrap.pm  view on Meta::CPAN


=head1 METHODS

=cut

# this is the substituion table. All the characters in the base64 decoded text
# must be replaced with its lookup

Readonly::Array my @sub_table => (
    0x3d, 0x65, 0x85, 0xb3, 0x18, 0xdb, 0xe2, 0x87, 0xf1, 0x52, 0xab, 0x63,
    0x4b, 0xb5, 0xa0, 0x5f, 0x7d, 0x68, 0x7b, 0x9b, 0x24, 0xc2, 0x28, 0x67,

lib/DBIx/Oracle/Unwrap.pm  view on Meta::CPAN

    my $text = shift;
    
    return unless $text;

    # Decode text and ignore the SHA1 hash (first 20 characters)
    my $decoded = substr(decode_base64($text), 20, length($text) - 1);
    return unless $decoded;

    my ($zipped, $source);

    #Translate each character
    foreach my $byte (split //, $decoded) {
        $zipped .= chr($sub_table[ord($byte)]);
    }

    # Uncompress (inflate) the data
    my $status = inflate \$zipped => \$source

 view all matches for this distribution


DBIx-Schema-Annotate

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension DBIx-Schema-Annotate

0.06 2015-05-26T08:48:55Z

    - table ddl acquired from database is decoded

0.05 2015-05-21T06:07:10Z

    - not do anything if there is no difference

 view all matches for this distribution


DBIx-Squirrel

 view release on metacpan or  search on metacpan

lib/DBIx/Squirrel/Crypt/Fernet.pm  view on Meta::CPAN

    $obj = DBIx::Squirrel::Crypt::Fernet->new($key);

A constructor (also see L<Fernet>).

If no arguments are passed then a random 32-byte Fernet key is generated. If
a Base64-encoded key is passed then it will be decoded and its signing and
encryption key fields extracted.

Take care never to display the binary signing and extraction keys, but to use
the C<to_string> method (or stringification) to recombine them into a Base64-
encoded Fernet key.

lib/DBIx/Squirrel/Crypt/Fernet.pm  view on Meta::CPAN

Alternative constructor (also see L<new>).

Returns a new C<DBIx::Squirrel::Crypt::Fernet> object.

If no arguments are passed then a random 32-byte Fernet key is generated. If
a Base64-encoded key is passed then it will be decoded and its signing and
encryption key fields extracted.

Take care never to display the binary signing and extraction keys, but to use
the C<to_string> method (or stringification) to recombine them into a Base64-
encoded Fernet key.

 view all matches for this distribution


DBIx-XML_RDB

 view release on metacpan or  search on metacpan

XML_RDB.pm  view on Meta::CPAN

Another use is a simple database extraction tool, which is included, called sql2xml.
This tool simply dumps a table in a database to an XML file. This can be used in
conjunction with xml2sql (part of the XML::DBI(?) package) to transfer databases
from one platform or database server to another.

Binary data is encoded using UTF-8. This is automatically decoded when parsing
with XML::Parser.

Included with the distribution is a "Scriptlet" - this is basically a Win32 OLE
wrapper around this class, allowing you to call this module from any application
that supports OLE. To install it, first install the scriptlets download from

 view all matches for this distribution


DDC-Concordance

 view release on metacpan or  search on metacpan

lib/DDC/Client.pm  view on Meta::CPAN

  my $msg = join('',@_);
  $msg = encode($dc->{encoding},$msg) if ($dc->{encoding} && utf8::is_utf8($msg));
  return pack($ifmt,length($msg)) . $msg;
}

## $decoded = $dc->ddc_decode($response_buf)
sub ddc_decode {
  my $dc  = shift;
  my $buf = unpack("$ifmt/a*",$_[0]);
  $buf = decode($dc->{encoding},$buf) if ($dc->{encoding});
  return $buf;

 view all matches for this distribution


( run in 0.708 second using v1.01-cache-2.11-cpan-26ccb49234f )