Copy link to clipboard
Copied
I imported a database into my server. When I read a record with Coldfusion 8, the accents are displayed but when a save the record the accents are replaced with a "?" (question mark). I'm not an experienced developer. If anybody can give me a clue!
Thanks
Jean
Copy link to clipboard
Copied
Where is the data coming from that you're writing back? Is it simply querying the DB for some data, and then immediately writing it back, or are you
displaying the values in a form, posting the form, and writing the posted data back to the DB?
Does the data get corrupted when the form is posted, as opposed to when the data is written back to the DB, IE: do you know it's getting corrupted between CF and the DB?
Are you setting the encoding for the form post?
You need to make sure all the contributing pieces know which encoding to treat the data as.
--
Adam
Copy link to clipboard
Copied
The problem appeared when I changed my hosting provider. I moved from Coldfusion MX and SQL 2000 to Coldfusion 8 and SQL Express. I do "input" into a form and a query update. I tried with charset UTF-8 and iso-8859-1 but I got the same result.
The first screen below is what I get in reading the record and the second screen after the update.
My undestanding is that the data is effectively corrupted when the form is posted back to the DB. Why? That's my problem.
Tanx
Jean
Copy link to clipboard
Copied
is the table defined the same way, ie with "N" datatypes? is the driver the db
same, ie the JDBC one (can't be ODBC)?
Copy link to clipboard
Copied
Could be a good point. My table was always defined as follows (part of it):
,
Prenom and nom are two corrupted fields losing its accents when the table is updated. Where do we define a "N" data type?
Thanks
Jean
Copy link to clipboard
Copied
you set the column datatypes via the sql admin application (studio or whatever
it's called these days).
btw none of your "screen" images, etc are getting thru to the forums.
Copy link to clipboard
Copied
After checking in the SQL server management, my text fields are defined varchar and SQL_Latin1_General_CP1_CI_AS.
Copy link to clipboard
Copied
well there you go.
Copy link to clipboard
Copied
Thanks for your help
Jean
Copy link to clipboard
Copied
Isn't that what the nvarchar column-type is supposed to address? I haven't used it . . .
Find more inspiration, events, and resources on the new Adobe Community
Explore Now