Hello,
This problem is really driving me crazy ...
* I have a mySql database which is latin1_swedish_ci
* In my web.config I have:
<globalization requestEncoding="ISO-8859-2"
responseEncoding="ISO-8859-2" fileEncoding="iso-8859-2" culture="pl-PL"
uiCulture="pl-PL" />
* My page has: <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-2" />
* And when I insert text in the database I have a replace like this:
private static string CodeAccents(string doReCode) {
string rt = doReCode;
// dutch
rt = rt.Replace("ê","ê");
rt = rt.Replace("Ê","Ê");
rt = rt.Replace("ë","ë");
rt = rt.Replace("Ë","Ë");
// french
rt = rt.Replace("é","é");
rt = rt.Replace("É","É");
rt = rt.Replace("è","è");
rt = rt.Replace("È","È");
rt = rt.Replace("ê","ê");
rt = rt.Replace("Ê","Ê");
rt = rt.Replace("á","á");
rt = rt.Replace("Á","Á");
rt = rt.Replace("à","à");
rt = rt.Replace("À","À");
rt = rt.Replace("ä","ä");
rt = rt.Replace("Ä","Ä");
// polish
rt = rt.Replace("A","Ą");
rt = rt.Replace("a","ą");
rt = rt.Replace("C","Ć");
rt = rt.Replace("c","ć");
rt = rt.Replace("E","Ę");
rt = rt.Replace("e","ę");
rt = rt.Replace("L","Ł");
rt = rt.Replace("l","ł");
rt = rt.Replace("N","Ń");
rt = rt.Replace("n","ń");
rt = rt.Replace("Ó","Ó");
rt = rt.Replace("ó","ó");
rt = rt.Replace("S","Ś");
rt = rt.Replace("s","ś");
rt = rt.Replace("Z","Ź");
rt = rt.Replace("z","ź");
rt = rt.Replace("Z","Ż");
rt = rt.Replace("z","ż");
return rt;
}
Now, when I for instance save this word: "Zdjecia"
And I return to the form it is saved like "Zdj & # 2 8 1 cia" (spaces
added for posting here)
But when I then save again and retur I get this: "Zdjecia" = "# 3 7
7 dje & # 2 6 3 i & # 2 6 1" (spaces added for posting here)
What am I doing wrong ???
Thanks ! 2 5544
Looks like for the set of code below, the entities in the Polish
section lack a terminal semicolon. For example, you coded:
rt = rt.Replace("s","ś");
and it should be
rt = rt.Replace("s","ś");
See the small difference ^^^
-KJ
AmigoFd wrote:
Hello,
This problem is really driving me crazy ...
* I have a mySql database which is latin1_swedish_ci
* In my web.config I have:
<globalization requestEncoding="ISO-8859-2"
responseEncoding="ISO-8859-2" fileEncoding="iso-8859-2" culture="pl-PL"
uiCulture="pl-PL" />
* My page has: <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-2" />
* And when I insert text in the database I have a replace like this:
private static string CodeAccents(string doReCode) {
string rt = doReCode;
// dutch
rt = rt.Replace("ê","ê");
rt = rt.Replace("Ê","Ê");
rt = rt.Replace("ë","ë");
rt = rt.Replace("Ë","Ë");
// french
rt = rt.Replace("é","é");
rt = rt.Replace("É","É");
rt = rt.Replace("è","è");
rt = rt.Replace("È","È");
rt = rt.Replace("ê","ê");
rt = rt.Replace("Ê","Ê");
rt = rt.Replace("á","á");
rt = rt.Replace("Á","Á");
rt = rt.Replace("à","à");
rt = rt.Replace("À","À");
rt = rt.Replace("ä","ä");
rt = rt.Replace("Ä","Ä");
// polish
rt = rt.Replace("A","Ą");
rt = rt.Replace("a","ą");
rt = rt.Replace("C","Ć");
rt = rt.Replace("c","ć");
rt = rt.Replace("E","Ę");
rt = rt.Replace("e","ę");
rt = rt.Replace("L","Ł");
rt = rt.Replace("l","ł");
rt = rt.Replace("N","Ń");
rt = rt.Replace("n","ń");
rt = rt.Replace("Ó","Ó");
rt = rt.Replace("ó","ó");
rt = rt.Replace("S","Ś");
rt = rt.Replace("s","ś");
rt = rt.Replace("Z","Ź");
rt = rt.Replace("z","ź");
rt = rt.Replace("Z","Ż");
rt = rt.Replace("z","ż");
return rt;
}
Now, when I for instance save this word: "Zdjecia"
And I return to the form it is saved like "Zdj & # 2 8 1 cia" (spaces
added for posting here)
But when I then save again and retur I get this: "Zdjecia" = "# 3 7
7 dje & # 2 6 3 i & # 2 6 1" (spaces added for posting here)
What am I doing wrong ???
Thanks !
Problem found !!!
My code-page (.aspx) was saved as ANSI document and not as UTF-8 ! So
all my polish characters weren't saved at all, but were replaced by the
"normal" characters ... !
Have to check if that's a setting in dreamweaver ...
KJ schreef:
Looks like for the set of code below, the entities in the Polish
section lack a terminal semicolon. For example, you coded:
rt = rt.Replace("s","ś");
and it should be
rt = rt.Replace("s","ś");
See the small difference ^^^
-KJ
AmigoFd wrote:
Hello,
This problem is really driving me crazy ...
* I have a mySql database which is latin1_swedish_ci
* In my web.config I have:
<globalization requestEncoding="ISO-8859-2"
responseEncoding="ISO-8859-2" fileEncoding="iso-8859-2" culture="pl-PL"
uiCulture="pl-PL" />
* My page has: <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-2" />
* And when I insert text in the database I have a replace like this:
private static string CodeAccents(string doReCode) {
string rt = doReCode;
// dutch
rt = rt.Replace("ê","ê");
rt = rt.Replace("Ê","Ê");
rt = rt.Replace("ë","ë");
rt = rt.Replace("Ë","Ë");
// french
rt = rt.Replace("é","é");
rt = rt.Replace("É","É");
rt = rt.Replace("è","è");
rt = rt.Replace("È","È");
rt = rt.Replace("ê","ê");
rt = rt.Replace("Ê","Ê");
rt = rt.Replace("á","á");
rt = rt.Replace("Á","Á");
rt = rt.Replace("à","à");
rt = rt.Replace("À","À");
rt = rt.Replace("ä","ä");
rt = rt.Replace("Ä","Ä");
// polish
rt = rt.Replace("A","Ą");
rt = rt.Replace("a","ą");
rt = rt.Replace("C","Ć");
rt = rt.Replace("c","ć");
rt = rt.Replace("E","Ę");
rt = rt.Replace("e","ę");
rt = rt.Replace("L","Ł");
rt = rt.Replace("l","ł");
rt = rt.Replace("N","Ń");
rt = rt.Replace("n","ń");
rt = rt.Replace("Ó","Ó");
rt = rt.Replace("ó","ó");
rt = rt.Replace("S","Ś");
rt = rt.Replace("s","ś");
rt = rt.Replace("Z","Ź");
rt = rt.Replace("z","ź");
rt = rt.Replace("Z","Ż");
rt = rt.Replace("z","ż");
return rt;
}
Now, when I for instance save this word: "Zdjecia"
And I return to the form it is saved like "Zdj & # 2 8 1 cia" (spaces
added for posting here)
But when I then save again and retur I get this: "Zdjecia" = "# 3 7
7 dje & # 2 6 3 i & # 2 6 1" (spaces added for posting here)
What am I doing wrong ???
Thanks !
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Philip Kofoed |
last post by:
Greetings,
I have a SQL server 2000 running on an english win2000 workstation. In a
database I have a table where one varchar column is set to...
|
by: Stan |
last post by:
Hallo,
I have developed an application in MS Access 2000 (Polish version) under MS
Windows XP prof (also Polish).
Now I would like to run this...
|
by: Wiktor Zychla |
last post by:
in my application I sometimes use KeyPress event. in the event handler I
have to check the char the user is trying to type.
in NTs everything is...
|
by: Ziemowit Skowronski |
last post by:
Hi,
I have a problem with displaying unicode strings in ASP.NET (C#). I
recieve data from MS SQL Server database and use them to construct...
|
by: bssjohn |
last post by:
Dear All,
I have developing a French website using PHP & Ajax. In that I tried to display some French texts from mysql database using Ajax. Form...
|
by: bss |
last post by:
Dear All,
I have developing a French website using PHP & Ajax. In that I tried
to display some French texts from mysql database using Ajax. Form...
|
by: Piotr 'Zenobius' Baranowski |
last post by:
Hello
I'm using DB2 Express-C V9 with FixPack2 on CentOS.
I have database created with territory PL.
I'm using it with WebApplication written in...
|
by: Piotrekk |
last post by:
Hi
I have a problem connected with DirectoryInfo class. My paths contain
polish characters not present in english alphabet. Problem is that...
|
by: LittleLeopard |
last post by:
Hi, I hope somebody can help me. I’m working on this website English/Portuguese and for example on this page...
|
by: tammygombez |
last post by:
Hey everyone!
I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: CD Tom |
last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
|
by: CD Tom |
last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
| |