Cargo Features

arrow-odbc has no features set by default.

[dependencies]
arrow-odbc = { version = "14.0.1", features = ["narrow", "wide"] }
narrow

On linux we assume use of a UTF-8 locale. So we set the narrow features implying that for queries,
connection strings and error messages the driver and driver manager supply utf8-strings. This might also be slightly faster since no transcoding between UTF-8 and UTF-16 is required.
Overall speed always depends on the driver, but it is reasonable to assume this is faster, more importantly, UTF-8 is likely to be more battled tested on these platforms, while UTF-16 is "only"
required by the standard.

On windows we can not assume the default locale to be UTF-8, so we compile odbc-api with default features implying the use of UTF-16 for queries, connection strings and error messages. This should work on any system. However if you would like to use the narrow UTF-8 function calls on windows systems you can set this feature flag.

Enables narrow of odbc-api

wide

On linux we assume use of a UTF-8 locale. So we set the narrow features implying that for queries, connection strings and error messages the driver and driver manager supply utf8-strings. This might also be slightly faster since no transcoding between UTF-8 and UTF-16 is required. Overall speed always depends on the driver, but it is reasonable to assume this is faster, more importantly, UTF-8 is likely to be more battled tested on these platforms, while UTF-16 is "only" required by the standard. However, if you are e.g. faced with a driver which does not use UTF-8, but only ascii, or want to use the wide functions calls for any other reason on a non-windows system you can set the wide feature flag to overwrite this behavior.

Enables wide of odbc-api