473,379 Members | 1,216 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

PHP and MSSQL character encoding problem.

Hello.
I've a problem (which I believe is a character encoding problem) where I
retrieve data from a MSSQL database and euro and pound sign symbols appear as
? when a do a print_r of the rows immediately after retrieving them from the
database. The data can be seen correctly in the SQL manager program.
I connect to the database using the PEAR DB library.
Has anyone encountered this problem and/or know of a solution.
Thanks,
David.
Jul 14 '08 #1
2 4785

"David Gillen" <be****@RedBrick.DCU.IEwrote in message
news:sl*******************@minerva.redbrick.dcu.ie ...
Hello.
I've a problem (which I believe is a character encoding problem) where I
retrieve data from a MSSQL database and euro and pound sign symbols appear
as
? when a do a print_r of the rows immediately after retrieving them from
the
database. The data can be seen correctly in the SQL manager program.
I connect to the database using the PEAR DB library.
Has anyone encountered this problem and/or know of a solution.
Thanks,
David.
==
yes.. This is one among them..

http://groups.google.co.in/group/com...ef9d056cfe0a96
Jul 14 '08 #2
David Gillen schreef:
Hello.
I've a problem (which I believe is a character encoding problem) where I
retrieve data from a MSSQL database and euro and pound sign symbols appear as
? when a do a print_r of the rows immediately after retrieving them from the
database. The data can be seen correctly in the SQL manager program.
I connect to the database using the PEAR DB library.
Has anyone encountered this problem and/or know of a solution.
Thanks,
David.
lemme guess. db = utf-8, http-equiv Content-Type is utf-8 but apache is
not.

Add this to your .htaccess
AddDefaultCharset UTF-8

Floortje
Jul 14 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones...
4
by: HeroOfSpielburg | last post by:
Hello, I am trying to using the Shift_JIS character set in my web pages, and have specified it as such in the <head>. <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> ...
8
by: Agnes | last post by:
In my .net ,i need to generate an xml file , however, user may input a chinese character, Then , the xml will got something unknow characters. the following is my code, Does anyone know how to...
18
by: james | last post by:
Hi, I am loading a CSV file ( Comma Seperated Value) into a Richtext box. I have a routine that splits the data up when it hits the "," and then copies the results into a listbox. The data also...
11
by: ralphie | last post by:
hi all since nearly 2 days i fight with mssql and utf-8 as i need to store and retrieve arabic characters. i tried the com approach ...
8
by: eugenio | last post by:
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...
17
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when...
5
by: eisenstein | last post by:
i read out an utf-8 xml file with greek or russian/cyrillic characters. i can display it in the browser but if i insert data into an mssql database -field is nvarchar(4000)- i only see ??? or...
10
by: Paul W | last post by:
Hi all, I have an application that reads data in from a text file and stores it in a database. My problem is that there are some characters in the file that aren't being handled properly. For...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.