Skip to content

Enable handling of unicode characters #1

@bewedeg

Description

@bewedeg

Hi Tony,
I think i might have found a small issue in

$fieldConfig, substr($line, $i, $fieldConfig['size'])

In Germany and other countries there are special characters like ä, ö, ü, ß and so on. If the underlying file has these encoded in unicode substr in PHP does not handle these characters very nicely, as the character bytewise is cut in half leaving garbage. PHP has mb_substr(...) to handle this character in the correct manner.

I replaced that in a local copy and i can confirm that it works as expected.
$fieldConfig, mb_substr($line, $i, $fieldConfig['size'])

Regards,
Bernhard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions