473,805 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

changing code page

Hi!
i read and update data from database that have
ISO-8859-2 code page set
default my application (windows app) run in polish code page
(win1250)

how can i read data and show them to user in default windows code page
and send them back to db in iso-8859-2 code page?
Pawel
Nov 17 '05 #1
2 5556
Mrozik wrote:
Hi!
i read and update data from database that have
ISO-8859-2 code page set
default my application (windows app) run in polish code page
(win1250)

how can i read data and show them to user in default windows code page
and send them back to db in iso-8859-2 code page?


Assuming you work with proper .NET (i.e. Unicode) strings in between,
there's nothing you have to do.

But if you're dealing with content at byte level, you have to reencode
all bytes using System.Text.Enc oding.Convert() .

Note that not all characters in Windows-1250 can be converted to
Latin-2 (the Euro symbol for example is missing), so this conversion is
not actually ideal -- you may lose user input.

Cheers,
--
http://www.joergjooss.de
mailto:ne****** **@joergjooss.d e
Nov 17 '05 #2
On Mon, 01 Aug 2005 21:58:24 +0200, Joerg Jooss <ne********@joe rgjooss.de>
wrote:
Mrozik wrote:
Hi!
i read and update data from database that have
ISO-8859-2 code page set
default my application (windows app) run in polish code page
(win1250)

how can i read data and show them to user in default windows code page
and send them back to db in iso-8859-2 code page?
Assuming you work with proper .NET (i.e. Unicode) strings in between,
there's nothing you have to do.


Yes i know that - the problem is, that database (Oracle)
contains data imported by other processes - I can't change
source and encoding of those data....

But if you're dealing with content at byte level, you have to reencode
all bytes using System.Text.Enc oding.Convert() .

Note that not all characters in Windows-1250 can be converted to
Latin-2 (the Euro symbol for example is missing), so this conversion is
not actually ideal -- you may lose user input.
thanks for your advice!
Pawel

Cheers,


Nov 17 '05 #3

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

Similar topics

3
3183
by: mvargasp | last post by:
Hi all, I have a web form which contains a frame, (a form containing a menu on the left and a web form containing a datagrid on the right). Also there is a button (right side) which transforms the datagrid content in a CSV file and forces the user to download the file. The following is the code used to force a download: 'strCadena contains the datagrid info separated by commas,
3
5980
by: M Wells | last post by:
Hi All, Just wondering how you go about changing the value of a session cookie via javascript? I have a PHP page that sets a session cookie when it first loads. I'd like to be able to change the value of that session cookie in response to a button click in a form, without resubmitting the page. For some reason, the following doesn't seem to work:
5
4221
by: Jim Marquardson | last post by:
Hi, I've struggled with this for a while now, so I'm asking for help. I am trying to click on a link in one page, have that link open up in a new window, and set that newly opened window's ifram to a specific url. Here is the code I'm using: <html> <head>
1
3382
by: Jaweed | last post by:
Hi I'm developing an ASP.NET app in Visual studio (using C# for code behind). My question is fairly simple (i think). When I go to the code behind page, the controls in the html page are made "protected" so that it can only be accessed from within that page. I would like to permanently make this "public" for certain controls, so that I can access them from another page (the page that a user control is embedded into for example). If I...
3
1980
by: Jeremy Ames | last post by:
I have a form that contains two hidden values, among other controls. I was wondering, if I change these values in server script and immediately do a server.transfer, do these values get updated before the page is changed? I want to say that because the values are changed but the page is never reloaded after the change, that these changes do not take effect before the server.transfer. Please let me know if I am correct here. I think I am...
2
2125
by: david | last post by:
Problem: There is a search button, Search, in form, for searching patient info list. The error occurs after the following steps: 1. search first time is OK, and all found the records are displayed in the datagrid by using databind(). 2. After the first-time search, I navigate the pages by clicking the page changing arrow < or > which defined in datagrid design (of course, the page index is chaning). 3. After the the page index changed,...
32
3702
by: deko | last post by:
I have a popup form with a textbox that is bound to a memo field. I've been warned about memo fields so I'm wondering if I should use this code. Is there any risk with changing the form's RecordSource like this? Am I asking for trouble doing this with a memo field? Thanks in advance. Private Sub cmdNextNote_Click() Dim lngNid As Long If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
12
4555
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in another forum from Peter Huang that said that an id="bg" as follows... <body MS_POSITIONING="GridLayout" runat="server" id="bg"> then we could do the following in our codebehind file....
7
4038
by: Jeffrey Spoon | last post by:
Hello, I'm a bit stuck trying to convert a text file which contains extended ASCII text and changing the ASCII values so they become readable. I do this by subtracting 127 from the ASCII value. However, at the moment I am just getting more gibberish so I'm probably doing something wrong. I tried using ASCII Encoding before to get the ASCII values. Although this worked for 0-127 ASCII values, extended ASCII gave strange values (such as 1992...
4
6464
by: libsfan01 | last post by:
hey this code wont work for my iframe in safari, i cant change the page by changing the src with js: <script language="javascript"> function loadcontent(page) { document.getElementById('iframeid').src = page; } </script>
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
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...
0
10360
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10366
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,...
1
7646
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
5542
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
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.