473,416 Members | 1,530 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,416 software developers and data experts.

oracle replaces ISO-8859-1 characters with question marks

The problem I'm having is that whenever a user enters
accented characters character into a form field the characters
are getting stored as question marks in the database.
For example, "façade" (c with cedilla) is stored as "fa?ade"
Does anyone have any idea how to fix this problem?

My page has a meta header to set Content-Type:
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
I traced the input to the PHP form submission page.
I printed the posted form fields and the characters
come through as expected, so I'm pretty sure that this
is a problem with the database side.
I'm using Oracle 10g running on Linux. I'm using PEAR db.
My update query is simple and straightforward:
UPDATE release SET message='façade' WHERE release_id=5831;
I have included my Oracle NLS database parameters.

Yours,
Noah

SQL> select * from NLS_DATABASE_PARAMETERS;

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8ISO8859P1
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.1.0.2.0

Jul 17 '05 #1
2 9578
On 22 Feb 2005 15:25:15 -0800, "Noah" <no**********@gmail.com> wrote:
The problem I'm having is that whenever a user enters
accented characters character into a form field the characters
are getting stored as question marks in the database.
For example, "façade" (c with cedilla) is stored as "fa?ade"
Does anyone have any idea how to fix this problem?

My page has a meta header to set Content-Type:
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
You'd be better off with a proper HTTP header, but anyway...
I traced the input to the PHP form submission page.
I printed the posted form fields and the characters
come through as expected, so I'm pretty sure that this
is a problem with the database side.
I'm using Oracle 10g running on Linux. I'm using PEAR db.
My update query is simple and straightforward:
UPDATE release SET message='façade' WHERE release_id=5831;
Hopefully you're not actually running that - you're using bind variables in
the real thing, right?
I have included my Oracle NLS database parameters.

SQL> select * from NLS_DATABASE_PARAMETERS;

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_CHARACTERSET WE8ISO8859P1


OK, so you can definitely store the things, so it's a client issue.

What's the NLS_LANG environment variable set to? This the most likely suspect
- if set wrongly it can easily give the problems described.

What's the definition of the table - message is just a VARCHAR2, right?

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
Great! Everything worked from the command-line sqlplus
when I set the environment variable:
export NLS_LANG=american_america.WE8ISO8859P1
So it was a client issue. But when I tried to set the same
environment variable from PHP using:
putenv("NLS_LANG=american_america.WE8ISO8859P1"));
the accented chars still get replaced, but now they are replaced with
upside-down Spanish question marks. Weird.

It works fine if I set the environment variable before I start Apache.
I wish it would work from the code side, but at least it works.

Yours,
Noah

Jul 17 '05 #3

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

Similar topics

3
by: Jack | last post by:
Hi I am just trying to get a feel for what oracle SQL syntax there is that would not be covered at all in anyway from a functionality perspective in the standard ANSI SQL.. Any input is...
1
by: JBBHF | last post by:
Hi i'm working on a web project, and i would like to make my oracle query work in mysql. select match.numero "nummatch", to_char(match.datematch, 'yyyy-MM-dd') "datematch", p1.numjoueur "j1",...
7
by: KingGreg | last post by:
All, Oracle 9i provides a "USING" clause option for inner joins, that allows me to say: SELECT * FROM TBL1 JOIN TBL2 USING KeyColumn assuming KeyColumn is in both TBL1 and TBL2. This is...
13
by: BigDaDDY | last post by:
Um yeah....In case you haven't figured it out, Microsoft sucks. I'm going to be kicked back in my chair eating popcorn and watching football 10 years from now, while all you clowns are scrambling...
11
by: Rosco | last post by:
Does anyone have a good URL or info whre Oracle and Access are compared to one another in performance, security, cost etc. Before you jump on me I know Oracle is a Cadillac compared to Access the...
4
by: RTJ | last post by:
I have experienced problems with Oracle OCI library. I was unable to properly link OCI library using gcc. Probably gcc compiler provided with SFU is unable to link native Windows library. Oracle...
8
by: danbredy | last post by:
Hi, I'm attempting to connect to an Oracle database using SQL Server 2005 Express (OS is Windows XP Professional) and having absolutely no luck. Here is the information SQL Plus gives me about...
2
by: farha | last post by:
Hi All, Magna Infotech - a part of $ 1 billion Nagarjuna Group has development centers in USA & India. Magna is an ISO 9001:2000 certified company Magna is a STPI regd. company We are in...
0
by: TechRecruit Consultants | last post by:
Hi Greets! This is sandy,Working in TechRecruit Consultants,Chennai as Head Operaitons - Recruitment. Currently we have openning in Unix/SQL/Oracle/JAVA for ISO 9001:2000/ CMM LEVEL 5 ...
0
by: TechRecruit Consultants | last post by:
Hi Greets! This is sandy,Working in TechRecruit Consultants,Chennai as Head Operaitons - Recruitment. Currently we have openning in Unix/SQL/Oracle/JAVA for ISO 9001:2000/ CMM LEVEL 5 ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
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,...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
isladogs
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...
0
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...

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.