Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6539899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:54:50+00:00 2026-05-25T10:54:50+00:00

Ok, so here is my setup. I am working on a PHP application, which

  • 0

Ok, so here is my setup. I am working on a PHP application, which is on a linux OS. I am trying to pass data over to a Windows OS, into a SQL Server database. I am using Freetds to act as the provider since this is what it seems everyone uses to communicate with SQL Server from a Linux machine. I am using ADODB which is a Database Abstraction Library for PHP.

I am also developing a checkout system that allows a user to select any one of the hundreds of countries that exist as well as input the state or province of that country. I take all of this data and have to pass it over to a third party system, which is the SQL Server instance in which I talked about previously.

The problem is, users are entering data with special characters for their states/countries such as ö. It took me hours to find that it wasn’t PHP, my application, my code as the special characters came out correctly at all points of the process even when debugging what was being passed to the stored procedure param in the adodb method. The problem was in FreeTDS as I found I needed to add the following line to my freetds.conf

client charset = UTF-8

This appear to work and I was super happy that it actually wasn’t my code and just a single line in the configuration file. Upon further testing after my task was closed in Jira and I thought I would never have to worry about this again, I get the email saying hey this isn’t working for Romanian states. So it appears that not all special characters are being passed correctly.

I am not that knowledgeable on character sets, I did read Joels Absolute Minimum every developer should know about them

An example of a state in Romania that doesn’t work is Și la o răspântie cu statui where I think it is the Ș character that is the problem. When running the query on SQL server it just converts that to an S. When doing in php and sending over freetds it returns this error message

The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 9 ("@in_state_name"): Data type 0xA7 has an invalid data length or metadata length.

I have tried setting SET names UTF8 and a few others before doing the query but I think again the problem is before it even gets to the query freetds isn’t passing over the correct character.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:54:51+00:00Added an answer on May 25, 2026 at 10:54 am

    The problem is that the current database only accepts varchar and not nvarchar so I have to either get the third party to support nvarchar or do some type of mapping to get an ascii equivelent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my setup. In my application delegate, I have a property called currentFoo.
Here's the setup I have in a vs2008 solution: Data layer in a project
Just a small SVN problem here. I setup my own SVN server Setting up
I'm working with htaccess in a php application. I want some behavior like this:
I've recently setup my Ubuntu web server with exim4 so my PHP website applications
I am trying to get Smarty setup and working, so that I can install
I was trying to setup a cron to run a php script on my
After getting counterclockwise working on my Eclipse setup and GAE development server running in
I'm working on yet another framework for PHP, and have run into a small
We have a setup here that is less than ideal, We have our webserver

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.