Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ectimo
Starting Member
2 Posts |
Posted - 2005-09-22 : 04:42:42
|
Hello people, I need help resolving a trouble with Croatian/Bosnian codepage that screws up somewhere in the process of transfer, or something. The idea is to fill out a database through the web, with user data that contains Croatian/Bosnian codepage characters, such as #382; #381; š Š #269; #268; #263; #262; #273; #272; SQL statement seems to be corect, because I write it out for debugging purposes, non the less data in the database looses #269; #268; #263; #262; #273; (inserted as C, c and d) but Ð (upper case) gets there corectly, as well as Š, š, Ž and ž.
If inserted through the Query Analiyer or Access, all data is stored and displayed corectly, what is shown by the record that is already stored.
Please someone help me out...
{http://www.izbori.ba/p/}
User, domain, and pwd are all the same: "Tim", no quotes, case sensitive for testing purposes only.
-- E/C Timo |
|
ectimo
Starting Member
2 Posts |
Posted - 2005-09-22 : 05:20:36
|
A function that replaces scharacters with their UTF-8 equivalents did it... a cooooool thing is this ASP... All resolved, just call a funct like this on the SQL statement, and fix it up for your language...
some thing like this
SQLfixed = toWeb(SQL) cmdDC.open SQLfixed, DataConnection
function toWeb (str) dim EncV, EncM EncV = replace(replace(replace(replace(replace(str, "Š","& Scaron;"),"C","# 268;"), "Ž","# 381;"), "Ð", "# 272;"), "C", "# 262;") EncM = replace(replace(replace(replace(replace(EncV,"š","& scaron;"),"c","# 269;"), "ž","# 382;"), "d", "# 273;"), "c", "# 263;") toWeb = EncM End function
-- E/C Timo |
 |
|
|
|
|
|
|