Hi,

I've been having some trouble with a simple content management system 
written in CF, running on RedHat Linux with Apache and connecting to an 
Oracle 8i database.

When an 8bit character (character with code between 128 and 255 inclusive) 
is added using one of the web forms, it's gets dropped to the 7bit ASCII 
range. The Merant ODBC driver and the Oracle 80 Native driver both drop 128 
from the 8bit character codes, e.g. chr(233), eacute, becomes chr(105), i. 
I have worked around this through a combination of using HTMLEditFormat and 
having some custom character code translations, but it is not ideal as this 
database may be used to publish to print again in the future (ok, I can 
un-escape characters, but why should I need to?).

I have tried using the Oracle ALTER SESSION statement at the start of 
transactions to try and change the NLS_LANGUAGE, NLS_TERRITORY and 
NLS_CHARSET environment variables for the connection, but I think I may 
have the syntax wrong as I'm getting a "missing or invalid option" error. 
I've included my statement below, if anyone knows what's wrong, please let 
me know.

Has anyone else experienced this? Is there a workaround? Can I force the 
drivers to send a correct ALTER SESSION statement when opening a 
connection? Should this be necessary, i.e. is there something amiss with 
the Oracle DBMS config that connecting clients are using the default Oracle 
charset of 7bit ASCII rather than the charset which has been set on the 
server, ISO-8859-1 (AFAIK using the NLS_LANG environment variable).

Thanks

Mark


now, that alter session statement:
-----------------------------------
ALTER SESSION
        SET NLS_LANGUAGE = 'AMERICAN',
                NLS_TERRITORY = 'AMERICA',
                NLS_CHARSET = 'WE8ISO8859P1'    


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to