php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49971 Cyrillic characters from MSSQL coming up as questionmarks
Submitted: 2009-10-23 12:56 UTC Modified: 2020-12-27 04:22 UTC
Votes:9
Avg. Score:4.2 ± 0.8
Reproduced:8 of 8 (100.0%)
Same Version:3 (37.5%)
Same OS:2 (25.0%)
From: odbc at ikiliekki dot org Assigned: cmb (profile)
Status: No Feedback Package: ODBC related
PHP Version: 5.3.0 OS: Windows server 2003 SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
33 + 2 = ?
Subscribe to this entry?

 
 [2009-10-23 12:56 UTC] odbc at ikiliekki dot org
Description:
------------
I have some Russian text in mssql, with fieldtype nvarchar(50). This text shows correctly in microsoft tools, such as ms sql server management studio express.

Querying the data with ODBC [ odbc_connect("DRIVER={SQL Server};Server=<ip>;Database=<db>;Charset=UTF-8",<user>,<pass>); ] results in questionmarks apart from ASCII characters in the same contents. (Such as "test ????")

I've tried setting collates, languages and such in SQL server and in queries (SET LANGUAGE N'Russian'). Wiresharking the data from webserver (IIS) to browser shows that it's questionmarks and not just being rendered wrong.

Expected result:
----------------
test &#1088;&#1077;&#1084;&#1077;&#1085;

Actual result:
--------------
test ?????

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-02 19:42 UTC] dukiii at yahoo dot com
I have the same problem.

Linux:
OpenSuse 11.2
FreeTDS version 0.82-1.1
PHP 5.3.1
Server version: Apache/2.2.13 (Linux/SUSE)

Windows XP Professional:
MSSQL Server Express 2005

I'm using "native" connection - mssql_connect(SERVER, USER, PASSWORD);

here is output:
-------------------------
ID_DC 	ID_DOC 	ID_ATTR 	VALUE
291 	50 	17 	404-78/10-IV
291 	50 	20 	2010-12-10 00:00:00.000
291 	50 	28 	????? - ???? - ?????
291 	50 	34 	????? - ???? - ?????
291 	470 	27 	50
-------------------------
????? should be cyrilic characters. Text shows correctly in microsoft tools, such as ms sql server management studio express.
 [2020-12-14 12:09 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-12-14 12:09 UTC] cmb@php.net
Does this still happen with any of the actively supported PHP
versions[1]?

> I have the same problem.

No.  Completely different extension.  This bug is about ext/odbc.

[1] <https://www.php.net/supported-versions.php>
 [2020-12-27 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Aug 03 02:01:24 2021 UTC