Skip to content

icu tokenizer may panic on invalid UTF-8 #34

Description

@mschoch

When the icu tokenizer gets invalid utf8 input like:

"something\x96something"

You may get a panic. This seems to depend on the version of ICU you have installed, and may also depend on some default ICU settings and/or environment variables.

Some users have reported that adding the following fixes the issue for them.

// #include "unicode/ucnv.h"
func init() {
    C.ucnv_setDefaultName(C.CString("UTF-8"))
}

This issue has been moved from the bleve repo: blevesearch/bleve#185

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions