Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

replace unsupported ucs-2 characters in a string with � #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bvarent
Copy link

@bvarent bvarent commented Jul 9, 2015

Freetds communicates with the server using UCS-2 (since v7.0). Freetds claims to convert from any given client charset to UCS-2 using iconv. Which should strip or replace unsupported chars. However in my experience, characters like 👍 (THUMBS UP SIGN, \u1F44D) end up in MSSQL shouting 'incorrect syntax' still.

So I've made this patch to replace any characters unsupported by UCS-2 beforehand, at the moment of quoting the string.

@bvarent bvarent force-pushed the feat/freetds-ucs2-limiter branch from d9fef9f to 7ce8343 Compare July 10, 2015 14:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant