Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to get ColdfusionMX to display UTF-8 characters from oracle db

5 views
Skip to first unread message

vlkoslak

unread,
Mar 3, 2005, 9:58:15 PM3/3/05
to
Hi I'm having a problem storing and retrieving UTF characters from an oracle 9i
r2 database.

While the database language is not UTF, the fields I am using are nvarchars,
and I have used oracle's isqlplus to input and retrieve UTF characters
without a problem, so the database end is fine.

Given a unicode string the table, when I retrieve the value in coldfusion
using cfquery, the output on the page looks as if the UTF string has been
converted to a WesternEuropean(ISO) string. However the browser (IE 6) says the
page is displayed as UTF-8.

For example I have the russian character ? stored in a field. When I retrieve
it via cfquery it displays ?? instead.
When I try to store ? via the coldfusion page, it stores the number 4
instead.

I have added the following lines to my application.cfm:

<cfscript>
SetEncoding("form","utf-8");
SetEncoding("url","utf-8");
</cfscript>

I have added the following lines to my form.cfm:
<cfprocessingdirective pageEncoding="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

And the page is saved as UTF-8 with the BOM on.

In addition the admin data source box for allowing unicode characters is
checked on.

I'm pretty frustrated cause I can't figure out what I'm doing wrong, if anyone
can help I'd appreciate it.

Thanks :)

Leonid77

unread,
Mar 7, 2005, 9:36:43 AM3/7/05
to
Hello everybody:

Absolute frustration working with international fonts !

I use SQL Server as back-end and ColdFusion(MX 6.1 without updater which kills
cfscheduler) as front-end.
I was able to display text correctly adding <CFHEADER NAME="content-type"> in
Application.cfm file
and <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
in each .cfm template.

However, it doesn take anything when you try to pass form fields, but only
either blank data or "?????"s. Not a null data, there is something there, but
who knows what. I also try all scripts mentioned in the previous and other
postings - nothing!

Whta's the hell is that?

I tried the same data insert procedure in . ASP, no problem at all !!! You
just put in the HTML <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=windows-1251"> and you are free of any bug to rest of your
international setting application.

So, it's not SQL Server, it's not HTML Forms, and I pretty shure it's not
Oracle as well - it's pure Cold Fusion.

It seems that since you started to use Java to comiple CF extension - it's
getting worse and worse.

Now, is there a solution for this serious problem, a solid and predictable
resolution? If not, than I have to - you force me! - to leave you product as an
obsolete and useless web application tool and invest my time and money into
.ASP and .NET technologies. It will be a sad farewell to CF - a greait web
prodcut before v5. (I guess no money back warrante :-() Such a waste !

Please, answer to me ASAP!!! I already spend two weeks dealing with this bug,
and could't start a development process. I can't wait more and at the point to
make a business decision to wich web technology to use for my company as an web
production environment.

Thanks in advance,
Leonid


PaulH

unread,
Mar 7, 2005, 1:22:11 PM3/7/05
to
first off please don't hijack threads, if you have another issue start a new
thread.

how are you text columns defined in your tables?

are you using the JDBC driver (labeled as "ms sql server" in cfadmin)?

are you in fact using sql server as the db? you also mention oracle.

if you want to see sql server used w/mx & unicode data try
http://www.sustainablegis.com/unicode/greekTest.cfm example.


Leonid77

unread,
Mar 8, 2005, 9:01:49 PM3/8/05
to
Thanks.

I did try what you suggest, and it does work with charset UTF-8.
It gets data from forms and insert into SQL Server which I use as a back-end.
It retrieves data properly. I use russian fonts for this project.

However, it creates another problem.
When I type hard coded text out CF QUERY, I get this:
?, ???????????, ??????? ??, ??????????? ????? ????? ?????
???? ??? ????? ??????? ??????

It doesn't look like russian!
Maybe it's CFussian?
If I use charset=windows-1251 with a combination <CFMETA> tag, I can see
russian font, but don't see what I insert in utf-8 from forms.
If I use your code, I insert data, but cannot type text in russian around the
cfquery.
I'm completely lost.
Do you know the solution?
Is there a solution?

Thanks in advance,
Leonid


PaulH

unread,
Mar 9, 2005, 12:44:17 AM3/9/05
to
russian is part of unicode. i'd suggest if at all possible you use unicode
instead of the windows cyrllic codepage.

what are you using to edit your cf pages? it doesn't seem to support unicode.

if you really can't use unicode then simply change all the utf-8 references to
the code page you prefer.


0 new messages