Skip to content

IBM i DB2 Latin-1 /ISO-8859-1 columns #536

Closed Answered by sportfloh
sportfloh asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for your quick response!
Turns out there is some broken whatever encoding in the table -.-
I'm on macOS and my locale is "en_US.UTF-8". So should be good.
My current solution looks like this:

    let mut cursor = db2_connection
        .execute(sql_statement, ())?
        .expect("SELECT statement must produce a cursor");

    let mut schema = arrow_schema_from(&mut cursor)?;
    schema.fields = schema
        .fields
        .iter()
        .map(|f| match *f.data_type() {
            // DataType::Utf8 => (**f).clone().with_data_type(DataType::Binary),
            DataType::Decimal128(1, 0) => (**f).clone().with_data_type(DataType::Boolean),
            DataType::Decimal128(_, 0) => (

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pacman82
Comment options

Answer selected by sportfloh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants