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 5607
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 polish
collation.
Regional settings for the system...
|
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 code on MS Windows XP EN and MS Access XP EN.
I have...
|
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 correct. however on W98 I've noticed that the...
|
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
navigation on the page. Because I'm from Poland, I have...
|
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 local I got the text from db with
Correct accents...
|
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
local I got the text from db with
Correct...
|
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 PHP, the pages are encoded in
UTF-8.
I'm...
|
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
DirectoryInfo class displays them in a very bad way. I...
|
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 http://www.goulartfilmes.com/en//IvyGoulart/tabid/54/Default.aspx we can see the...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |