I'm having a strange problem. When special symbols are stored in my
database, if the record is edited, it gets written back to the database as
a different symbol or several symbols. Here's an example:
I have a Firebird application that uses C++ and IBObjects. If I enter or
paste into a database field some text containing the Trademark symbol ™
(typed alt-0153. Bytes are e2 84 a2), it shows correctly in the database,
on the screen, etc.
Now, if I access the same database record using .NET, the Firebird .NET
provider, and Entity Framework, and edit that record, even if I don't
modify the field containing the trademark symbol, when I save the record,
it writes the trademark symbol back as: â„¢ (bytes are c3 a2 e2 80 9e c2
a2).
Here is the code that I'm using:
PRODUCT p = db.PRODUCTS.FirstOrDefault<PRODUCT>(pp => pp.PRODBARCODE ==
ecp.PRODBARCODE && pp.STOREID == _storeid);
p.PRODWEBDIRTY = "F";
db.Entry(p).State = EntityState.Modified;
db.SaveChanges();
Note that PRODWEBDIRTY is not the field containing the trademark symbol. I
guess it's just writing back the entire record to the database, but with
the special characters converted.
Why does it do this? How can I prevent it?
-Joe
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider