Hi...not sure if this is the right group for this posting, but i'm
don't know where else to post. I've got a simple problem...I have a
linux box running apache 2.0 and php5. I'm trying to use the mssql
functions in php to retreive data from a mssql server 2k. I'm pulling
data from the customers table in the northwind db and i'm getting
strange characters instead of special characters. Below is a sample
output:
(where the quotes are i get a question mark)
What I'm getting:
ALFKI - Alfreds Futterkiste - Maria Anders
ANATR - Ana Trujillo Emparedados y helados - Ana Trujillo
ANTON - Antonio Moreno Taquer?a - Antonio Moreno
AROUT - Around the Horn - Thomas Hardy
BERGS - Berglunds snabbk?p - Christina Berglund
What I should get:
ALFKI - Alfreds Futterkiste - Maria Anders
ANATR - Ana Trujillo Emparedados y helados - Ana Trujillo
ANTON - Antonio Moreno Taquería - Antonio Moreno
AROUT - Around the Horn - Thomas Hardy
BERGS - Berglunds snabbköp - Christina Berglund 8 10556 eu*****@iatmgu. com wrote:
Hi...not sure if this is the right group for this posting, but i'm
don't know where else to post. I've got a simple problem...I have a
linux box running apache 2.0 and php5. I'm trying to use the mssql
functions in php to retreive data from a mssql server 2k. I'm pulling
data from the customers table in the northwind db and i'm getting
strange characters instead of special characters. Below is a sample
output:
(where the quotes are i get a question mark)
What I'm getting:
ALFKI - Alfreds Futterkiste - Maria Anders
ANATR - Ana Trujillo Emparedados y helados - Ana Trujillo
ANTON - Antonio Moreno Taquer?a - Antonio Moreno
AROUT - Around the Horn - Thomas Hardy
BERGS - Berglunds snabbk?p - Christina Berglund
What I should get:
ALFKI - Alfreds Futterkiste - Maria Anders
ANATR - Ana Trujillo Emparedados y helados - Ana Trujillo
ANTON - Antonio Moreno Taquería - Antonio Moreno
AROUT - Around the Horn - Thomas Hardy
BERGS - Berglunds snabbköp - Christina Berglund
What charset are you using for your page? And what does the page source
show?
Probably alt.html might have been a better group to start, but this one
is a logical choice.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
Thanks for the reply....
I've tried utf-8 and ISO 8859-1 but I either get empty squares or
question marks.
The html source shows question marks as well. I'm guessing, but I think
the problem may be that the mssql module is not able to handle the
chars or something with the apache config. When I run the same script
on win2k3 server with php and iis6 the characters show without a
problem.
Jerry Stuckle wrote:
eu*****@iatmgu. com wrote:
Hi...not sure if this is the right group for this posting, but i'm
don't know where else to post. I've got a simple problem...I have a
linux box running apache 2.0 and php5. I'm trying to use the mssql
functions in php to retreive data from a mssql server 2k. I'm pulling
data from the customers table in the northwind db and i'm getting
strange characters instead of special characters. Below is a sample
output:
(where the quotes are i get a question mark)
What I'm getting:
ALFKI - Alfreds Futterkiste - Maria Anders
ANATR - Ana Trujillo Emparedados y helados - Ana Trujillo
ANTON - Antonio Moreno Taquer?a - Antonio Moreno
AROUT - Around the Horn - Thomas Hardy
BERGS - Berglunds snabbk?p - Christina Berglund
What I should get:
ALFKI - Alfreds Futterkiste - Maria Anders
ANATR - Ana Trujillo Emparedados y helados - Ana Trujillo
ANTON - Antonio Moreno Taquería - Antonio Moreno
AROUT - Around the Horn - Thomas Hardy
BERGS - Berglunds snabbköp - Christina Berglund
What charset are you using for your page? And what does the page source
show?
Probably alt.html might have been a better group to start, but this one
is a logical choice.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
On 2006-07-11 23:25:45 +1000, eu*****@iatmgu. com said:
Thanks for the reply....
I've tried utf-8 and ISO 8859-1 but I either get empty squares or
question marks.
The html source shows question marks as well. I'm guessing, but I think
the problem may be that the mssql module is not able to handle the
chars or something with the apache config. When I run the same script
on win2k3 server with php and iis6 the characters show without a
problem.
Jerry Stuckle wrote:
>eu*****@iatmgu. com wrote:
>>Hi...not sure if this is the right group for this posting, but i'm don't know where else to post. I've got a simple problem...I have a linux box running apache 2.0 and php5. I'm trying to use the mssql functions in php to retreive data from a mssql server 2k. I'm pulling data from the customers table in the northwind db and i'm getting strange characters instead of special characters. Below is a sample output:
(where the quotes are i get a question mark) What I'm getting:
ALFKI - Alfreds Futterkiste - Maria Anders ANATR - Ana Trujillo Emparedados y helados - Ana Trujillo ANTON - Antonio Moreno Taquer?a - Antonio Moreno AROUT - Around the Horn - Thomas Hardy BERGS - Berglunds snabbk?p - Christina Berglund
What I should get:
ALFKI - Alfreds Futterkiste - Maria Anders ANATR - Ana Trujillo Emparedados y helados - Ana Trujillo ANTON - Antonio Moreno Taquería - Antonio Moreno AROUT - Around the Horn - Thomas Hardy BERGS - Berglunds snabbköp - Christina Berglund What charset are you using for your page? And what does the page source show?
Probably alt.html might have been a better group to start, but this one is a logical choice.
-- ============== === Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============== ===
Grasping at straws, but have you checked the collation setting on the
MSSQL server? eu*****@iatmgu. com wrote:
Hi...not sure if this is the right group for this posting, but i'm
don't know where else to post. I've got a simple problem...I have a
linux box running apache 2.0 and php5. I'm trying to use the mssql
functions in php to retreive data from a mssql server 2k. I'm pulling
data from the customers table in the northwind db and i'm getting
strange characters instead of special characters. Below is a sample
output:
The text columns in the Northwind database are all nvarchar/ntext--i.e.
Unicode. These have to be flatten into an 8-bit encoding, since the
libraries used by the mssql extension can't handle Unicode (nor can PHP
itself for that matter).
On Windows, I believe the encoding is determined by the current locale.
On Linux, it's set in freetds.conf.
Thank you all for the reply...
How do I flatten into an 8-bit encoding...?
Chung Leong wrote:
eu*****@iatmgu. com wrote:
Hi...not sure if this is the right group for this posting, but i'm
don't know where else to post. I've got a simple problem...I have a
linux box running apache 2.0 and php5. I'm trying to use the mssql
functions in php to retreive data from a mssql server 2k. I'm pulling
data from the customers table in the northwind db and i'm getting
strange characters instead of special characters. Below is a sample
output:
The text columns in the Northwind database are all nvarchar/ntext--i.e.
Unicode. These have to be flatten into an 8-bit encoding, since the
libraries used by the mssql extension can't handle Unicode (nor can PHP
itself for that matter).
On Windows, I believe the encoding is determined by the current locale.
On Linux, it's set in freetds.conf.
Discovered more information:
I changed my code from using
$dbh = DB::connect("ms sql://sa:pa******@192 .168.0.1/northwind"); to
simply using the freetds connection
putenv("FREETDS CONF=/etc/freetds.conf");
$db=mssql_conne ct("MyServer2k" ,"sa","password ");
(freetds.conf setting)
[MyServer2k]
host = 192.168.0.1
port = 1433
tds version = 8.0
when the script runs now I get this error:
Warning: mssql_query() [function.mssql-query]: WARNING! Some
character(s) could not be converted into client's character set.
Unconverted bytes were changed to question marks ('?'). (severity 16)
in /var/www/test/testing/index.php on line 31
Same problem just wanted to add to it for other to see.
deciacco wrote:
Thank you all for the reply...
How do I flatten into an 8-bit encoding...?
Chung Leong wrote:
eu*****@iatmgu. com wrote:
Hi...not sure if this is the right group for this posting, but i'm
don't know where else to post. I've got a simple problem...I have a
linux box running apache 2.0 and php5. I'm trying to use the mssql
functions in php to retreive data from a mssql server 2k. I'm pulling
data from the customers table in the northwind db and i'm getting
strange characters instead of special characters. Below is a sample
output:
The text columns in the Northwind database are all nvarchar/ntext--i.e.
Unicode. These have to be flatten into an 8-bit encoding, since the
libraries used by the mssql extension can't handle Unicode (nor can PHP
itself for that matter).
On Windows, I believe the encoding is determined by the current locale.
On Linux, it's set in freetds.conf.
deciacco wrote:
Discovered more information:
I changed my code from using
$dbh = DB::connect("ms sql://sa:pa******@192 .168.0.1/northwind"); to
simply using the freetds connection
putenv("FREETDS CONF=/etc/freetds.conf");
$db=mssql_conne ct("MyServer2k" ,"sa","password ");
(freetds.conf setting)
[MyServer2k]
host = 192.168.0.1
port = 1433
tds version = 8.0
Try adding the line
client charset = cp1250
or
client charset = utf8
That did it!!!
I don't quite understand how it works or why I needed to use the php
function putenv() but it works...
I added the line marked by -->
[MyServer2k]
host = 192.168.0.1
port = 1433
tds version = 8.0
-- client charset = UTF-8
and I went back to using PEAR:
$dbh = DB::connect("ms sql://sa:password@MyS erver2K/northwind");
Thank you!!
Chung Leong wrote:
deciacco wrote:
Discovered more information:
I changed my code from using
$dbh = DB::connect("ms sql://sa:pa******@192 .168.0.1/northwind"); to
simply using the freetds connection
putenv("FREETDS CONF=/etc/freetds.conf");
$db=mssql_conne ct("MyServer2k" ,"sa","password ");
(freetds.conf setting)
[MyServer2k]
host = 192.168.0.1
port = 1433
tds version = 8.0
Try adding the line
client charset = cp1250
or
client charset = utf8
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Anas M. Nebuchadnezzar XXXVII |
last post by:
I am loading an Xml file from a sql server. I have one field that
contains child nodes stored as text. The problem is, when I try to imort
the dataset into a XmlDataDocument, it loads the whole thing as a text
element. (with all of the special characters converted) The best
solution I've found so far is to do a string replace on all of the
special characters. Like so:
DataSet ds = new DataSet();
ds.EnforceConstraints = false;...
|
by: Renuka |
last post by:
Hello,
I have to retrive 2 columns from the database which have HTML
characters like < > (the less than"<" and greater than sign
">")in their data.
Is there any function in C# which can do this to convert these
characters back to "<" and ">" signs.
Please tell me asap.
|
by: ram0812 |
last post by:
Helo guys,
I am trying to query the MSSQL DB using ADO.
I am not able to make the LIKE statement fetch the correct results.
Can anyone tell me what I need to do to get this working?
Below is the code snippet:
import win32com.client
const = win32com.client.constants
#conn = establish SQL connection
|
by: kenneth.osenbroch |
last post by:
Hi,
I have a MSSQL Server communicating with an Oracle database through a
MSSQL linked server using a MS ODBC connection.
If I query the Oracle database through the Oracle ODBC 32Bit Test, the
result is fine:
select addrsurname from address where addrnr = 6666;
HÅKANSSON
|
by: Valli |
last post by:
Hi,
I want to send ascii data over the tcp socket in VB.NET.
When the data reaches the destination, the special characters in the
messages are recived as '?'. I meant the special characters which are not
keyborad characters.
Example chr(250), chr(254).
Is there any way to send these kind of special characters through sockets?
Is any examples available?
| |
by: Marc Scheuner |
last post by:
Folks,
we're trying to stream back a result set from a SQL query into Excel
from our ASP.NET application.
Basically, we're doing this here:
Response.ContentType = "text/csv";
Response.Charset = "utf-8";
|
by: Todd Michels |
last post by:
Hi all,
I am trying to send data from a form and insert it into a MSSQL DB.
When I submit the data I get: Warning: mssql_query()
: message: The name "Todd" is not permitted in
this context. Valid expressions are constants, constant expressions, and
(in some contexts) variables. Column names are not permitted. (severity
15) in "Myfile"
|
by: hassanali20 |
last post by:
I've surfed this forum and found one thread which was talking about the same problem i've, but it didn't help in my situation.
http://www.thescripts.com/forum/thread510563.html
I could connect to MSSQL server using freetds 8.0 and able to run queries to MSSQL server, but the query doesn't fetch anything when it runs on a column having datatype as VARCHAR having special character as in <méxico> (note the second character) the acute accent.
...
|
by: Tom Andrecht |
last post by:
I'm trying to get some encryption/decryption routines going to take care of
my data, and while the encryption is working great, I keep running into the
message "Padding is invalid and cannot be removed" on the decryption piece.
From everything I can see, I am doing things correctly here My code is as
follows:
private const string PassStr = "MyPrivateKey";
private static readonly byte PassSalt = new byte { Byte Byte
Byte Byte Byte};...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |