Skip to content

Impossible to avoid use_utf16 option warning on older FreeTDS versions #410

Closed
@jeremyevans

Description

@jeremyevans

tiny_tds forces the :use_utf16 value to true or false before calling connect (https://github.com/rails-sqlserver/tiny_tds/blob/master/lib/tiny_tds/client.rb#L52), and if the value is true or false, emits a warning inside connect (https://github.com/rails-sqlserver/tiny_tds/blob/master/ext/tiny_tds/client.c#L364-L366).

I think there are a couple options here. You could skip forcing the :use_utf16 value to true if the :use_utf16=>nil option is used, either using Hash#fetch or Hash#has_key? to check if the value is explicitly given as nil, and leave it as nil in that case. Alternatively, maybe just do not warn if the value is false.

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