473,785 Members | 2,938 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_PA RAMETERS;

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENC Y AMERICA
NLS_NUMERIC_CHA RACTERS .,
NLS_CHARACTERSE T WE8ISO8859P1
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUA GE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_F ORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FOR MAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_T Z_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURREN CY $
NLS_COMP BINARY
NLS_LENGTH_SEMA NTICS BYTE
NLS_NCHAR_CONV_ EXCP FALSE
NLS_NCHAR_CHARA CTERSET AL16UTF16
NLS_RDBMS_VERSI ON 10.1.0.2.0

Jul 17 '05 #1
2 9628
On 22 Feb 2005 15:25:15 -0800, "Noah" <no**********@g mail.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_PA RAMETERS;

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_CHARACTERS ET 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.andyhsoftwa re.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=americ an_america.WE8I SO8859P1
So it was a client issue. But when I tried to set the same
environment variable from PHP using:
putenv("NLS_LAN G=american_amer ica.WE8ISO8859P 1"));
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
5933
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 appreciated.. Thank you, Jack
1
5656
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", p2.numjoueur "j2", po1.p1 "m1p1", po1.p2 "m1p2", po2.p1 "m2p1",
7
4794
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 HIGHLY desirable for our software make use of, but we also support SQL Server. There is no USING option available, and
13
3328
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 to rewrite all your code because Microsoft upgraded all their crap and nothing you wrote 10 years earlier works. It doesn't take a rocket scientist to figure out that Microsoft is unreliable. Try opening an Excel 95 spreadsheet you wrote in...
11
17063
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 Ford Fairlane. I need this info to complete a school project. Thanks.
4
4086
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 provides OCI dll (named oci.dll) and additionally OCI stub library (oci.lib) for Microsoft MSVC compiler. I have attempted to link dora with both OCI dll and OCI lib. Link with OCI lib resulted with many strange linker errors
8
14376
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 the database when I log in - Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options
2
1441
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 need of candidates holding Valid H-1 Visas with the following skill sets:
0
972
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 Company in US.
0
1124
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 Company in US.
0
9645
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, 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...
0
10330
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, 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...
0
10153
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9952
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
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 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...
0
6740
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();...
0
5381
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...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2880
bsmnconsultancy
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...

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.