Skip to content

Bug: insensitive like query failing with multibyte characters #9236

@ECode16

Description

@ECode16

PHP Version

7.4

CodeIgniter4 Version

4.4.8

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Windows

Which server did you use?

cli

Database

Postgres 16

What happened?

strtolower() in BaseBuilder.php on line 1135 will ignore the multibyte characters (according to PHP8 docs) or in experience on 7.4 will mangle them into diamonds (�).

Steps to Reproduce

$query->like('name', 'Š', 'both', null, true)->find();

Expected Output

all rows where name contains š

Actual Output

ErrorException: pg_query(): Query failed: ERROR: invalid byte sequence for encoding "UTF8": 0xe5 0xa1 0x27 in C:....

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions