473,683 Members | 3,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Polish characters displayed incorrect after post

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 is polish.
Data entered in a client application looks fine until they are posted.
When reading the data with the client application, the special polish
characters are incorrect, they appears as e.g. '1' and '3'.
The strange thing is that when I use query analyzer to look at the data,
then the polish characters appears as they should!
My client app use ADO, the SQLOLEDB provider. I have tried to use
'Locale Identifier=xxxx ' in the connection string, without any luck.
If I change the column to be nvarchar instead of varchar, then it work,
but unfortunately, this solution is not an option. This should work on
varchar columns, since polish is not multibyte.

What am I doing wrong??

TIA
Best regards
Philip Kofoed

Jul 20 '05 #1
7 8789
Philip Kofoed (ko****@tiscali .dk) writes:
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 is polish.
Data entered in a client application looks fine until they are posted.
When reading the data with the client application, the special polish
characters are incorrect, they appears as e.g. '1' and '3'.
The strange thing is that when I use query analyzer to look at the data,
then the polish characters appears as they should!
My client app use ADO, the SQLOLEDB provider. I have tried to use
'Locale Identifier=xxxx ' in the connection string, without any luck.
If I change the column to be nvarchar instead of varchar, then it work,
but unfortunately, this solution is not an option. This should work on
varchar columns, since polish is not multibyte.


You say that the regional settings of the system are Polish, but which
system are you talking about?

What are the regional settings of the machine where the client application
runs? If that machine has for instance Danish settings, the Polish
characters will indeed be converted.

Could you give more examples on how the various Polish characters are
displayed as? How is a-ogonek displayed, c-acute, etc?

--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
Erland Sommarskog wrote:
You say that the regional settings of the system are Polish, but which
system are you talking about?
The PC where _both_ the sql server and the client app runs, client app is
running on the same PC as the sql server. Windows is english, but with polish
regional settings. Collation of the varchar column where I'm saving the polish
string is polish.

Could you give more examples on how the various Polish characters are
displayed as? How is a-ogonek displayed, c-acute, etc?


I have placed some screenshots here:
http://www.provosoft.com/sql/sql.html

Data are stored correct, since query analyzer reads and displays data correct.
So the problem must be somewhere else.

Best regards
Philip Kofoed

Jul 20 '05 #3
Philip Kofoed (ko****@tiscali .dk) writes:
The PC where _both_ the sql server and the client app runs, client app
is running on the same PC as the sql server. Windows is english, but
with polish regional settings. Collation of the varchar column where I'm
saving the polish string is polish.


But is Polish the default locale for the server? Or is it just the
setting for the user you are logged in as?

And what value do you have in
HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\C ontrol\Nls\Code Page\ACP?
Does it say 1252 or 1250?

Looking at the examples, it seems clear that when the data is received
from SQL Server is taken to be Latin-1 data, and then there is a
conversion to CP1250, using fallback characters. For instance L-slash
is 163, which is the pound sign in Latin-1, whence the L. l-slash is
179 in Latin-2, while in Latin-1 this code point is 3-superscript, so
3 is used as the fallback.
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4
> But is Polish the default locale for the server? Or is it just the
setting for the user you are logged in as?
Default locale is Polish. 'Language settings for the system' set to Central
Europe (default), 'Settings for current user' set to Polish locale.
And what value do you have in
HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\C ontrol\Nls\Code Page\ACP?
Does it say 1252 or 1250?


1250, i.e eastern europe.

I just tried running my client app on a polish win XP. Client app then
connects to sql server running on english win 2000, default locale polish.
Characters are _still_ corrupted??
Query Analyzer still displays characters correct.

I'm going to leave this problem, and send it back the support staff. Thank you
for your time and effort, Erland!

Best regards
Philip Kofoed

Jul 20 '05 #5
Philip Kofoed (ko****@tiscali .dk) writes:
But is Polish the default locale for the server? Or is it just the
setting for the user you are logged in as?


Default locale is Polish. 'Language settings for the system' set to
Central Europe (default), 'Settings for current user' set to Polish
locale.


The last straw:

SELECT serverproperty( 'Collation'),
databasepropert yex('yourdb', 'Collation')

And exactly how do the queries submitted by the application look like?

I refuse to believe that the language of Windows should matter.

--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #6
Hi Erland,
I refuse to believe that the language of Windows should matter.


I have found out that if I create a new database with polish collation
then it works on english windows then regional settings is polish.
If collation of the DB isn't polish, but a column has polish collation,
then characters read from that column is incorrect.

Our installation crew that installed the original server in Poland,
installed it with Latin collation, realized their mistake, and used DTS to
copy the DB to a new DB with polish collation, and characters in the new
DB was dispalyed incorrect. I haven't tested this last scenario, because
our problem is solved when using polish collation when creating the DB.

Thanks again for all your help! :)

Best regards
Philip Kofoed

Jul 20 '05 #7
Philip Kofoed (ko****@tiscali .dk) writes:
I have found out that if I create a new database with polish collation
then it works on english windows then regional settings is polish.
If collation of the DB isn't polish, but a column has polish collation,
then characters read from that column is incorrect.


Don't really see why this is happening if you are getting data directly
from the table. But if you for some reason first get data into local
variables, it's obvious, as local variables always have the collation
of the database.

Anyway, you got it working and that's the main thing.
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
9370
by: SMG | last post by:
Hi All, I have created an application which is working fine and is in about to launch, now suddenly my mgmt says there are chances that Scrip ID( a particular id and not prim key) may have special characters like '&,*,),( or /' This data(field/key) I am passing this value as a querystring. e.g. value to be passed : ABC http://localhost/myProj/abc.aspx?ScripID=ABC
4
3481
by: Kivanc Toker | last post by:
Hi, I've got a problem with displaying texts with turkish characters. There is a website administration system, which is developed using ASP (VBScript) and ADO. This system is being used for inserting product informations in to a ms-sql database. There is another webbased application, which is developed using ASP.NET and ADO.NET (C#). For this second application there is a separate ms-sql
0
2354
by: Larry Neylon | last post by:
Hi there, I'm currently trying to implement a website that will store and retrieve Polish, so I need to be able to handle Polish characters using classic ASP with MySql5. Does anybody have an experience of doing this as I'm banging my head against a brick wall getting this to work using either utf8 or latin2. I can't believe I'm the first person in the world to want to do this! I've input Polish characters directly into the database...
2
5619
by: AmigoFd | last post by:
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" />
4
3685
by: robert.szczepanski | last post by:
Hi everybody; I can't change polish sign to small letter. This is my php script: <?php setlocale(LC_ALL, "pl_PL.UTF-8") ; //this function return "pl_PL.UTF-8"
8
5133
by: Werner Partner | last post by:
I would like to write correct poloish letters, e.g. in the following page: http://www.kairos-team.de/?lang=pl There are such letters as ł, ń, ę, and so on. I found these letter sin polish wikipedia, I looked at the source code, but there is nothing to be seen, what I can do to make these letters. thanks for help
0
1323
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 have tried to change project properties/ assembly information / neutral language to Polish but it didn't help. I would be grateful for any help.
9
4275
by: Peter Bengtsson | last post by:
In UTF8, \u0141 is a capital L with a little dash through it as can be seen in this image: http://static.peterbe.com/lukasz.png I tried this: '' I was hoping it would convert it it 'L' because that's what it visually looks like. And I've seen it becoming a normal ascii L before in other programs such as Thunderbird.
0
1371
oll3i
by: oll3i | last post by:
i have created a database with latin2 charset and latin2_general_ci collation i also tried utf8 and utf8_polish_ci collation but i get an error mysql> INSERT INTO `candidate_provinces` VALUES(1, 'dolnośląskie'); ERROR 1366 (HY000): Incorrect string value: '\x98l\xA5ski...' for column 'provin ce' at row 1 when i insert some words with polish diacritic characters THANK YOU
0
9043
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8753
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8771
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7582
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6429
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4519
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2195
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.