473,847 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

German Characters in textbox

Hi all,

When a user enters a german character in a textbox (such as ö ä ü ß) and I
try to save it, these characters get converted to a different character.
How can I prevent this?


Jun 2 '07
10 5583

I have made a simple program to test it. (Dutch settings)

Imports System.io
Public Class Form1
Private Sub Form1_Load(ByVa l sender As _
System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
TextBox1.Text = "ö ä ü ß"
Using sw As New StreamWriter("C :\TestFile.txt" )
sw.Write(TextBo x1.Text)
End Using
Using sr As New StreamReader("C :\TestFile.txt" )
TextBox2.Text = sr.ReadToEnd
End Using
Catch Ex As Exception
MessageBox.Show (Ex.Message)
End Try
End Sub
End Class

This gives in textbox2 the same characters as in textbox1

Probably have you played a little to much with the language settings of your

"Martin" <x@y.comschre ef in bericht
news:Ow******** ******@TK2MSFTN GP06.phx.gbl...
Hi all,

When a user enters a german character in a textbox (such as ö ä ü ß) and I
try to save it, these characters get converted to a different character.
How can I prevent this?


Jun 3 '07 #11

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

Similar topics

by: Jeff | last post by:
Having a problem displaying both german and chinese characters from a UTF-8 database on the same *.jsp page. Can make Chinese characters appear correctly by including the following lines: <%@ page pageEncoding="UTF-8" %> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
by: Irishmaninusa | last post by:
Hello Everyone, I have email form on a website and there is some fields that have german characters in it, like the umlat and so on, when I look at the email that is retuyrned I get the following message Form Name: E-Mail/Fax-Formular für den ValuePark ========== Other Data: ==========
by: Manoj | last post by:
Hi All, I am using command line bcp utility of SQL Server to import data from a text file to database. I have some german words in the text file and after import the German characters are lost. see eg below. Input : Kühner, Klaus -> Text file value
by: Ajey | last post by:
Hi, I have a string which contains some german characters e.g 'Menü'. I am converting it to upper case using wcsupr (). But ü is not converted to Ü. There are other characters too. I can use the _wsetlocale () function before using _wcsupr (). I cannot use the current machines locale setting. The strings have to be converted to upper case based on the locale of the target machine which is a SQL Server. What's the most efficient way of...
by: Jean | last post by:
Hi everyone, Can someone help me please? I am using a form which imports a .csv file's data into a temporary table called tblQuestImport_csvraw. The problem is that I am working with a German character set here - whenever I import some text with those special characters, I get the wrong data in my temporary table. For example, ä becomes ÷, ö becomes an o with a little stripe above it, and ü becomes the sign used for expressing a value...
by: George | last post by:
Hi, I am puzzled by the following and seeking some assistance to help me understand what happened. I have very limited encoding knowledge. Our SAP system writes out a text file which includes German characters. 1. When I use StreamReader(System.String filepath) without specifying an encoding method, the German characters such as Ä are lost when I do a ReadLine()
by: lakilevi | last post by:
Hi. I try to convert XML into HTML using XSL. Everything was ok until I used German characters. If I have german chars in the XML structure, and I display them with: <xsl:value-of select="german_word"/> than displays correct the characters. But I dont't want to take the german text from XML structure. This text is a constant table-header text, and I do not need to include it in te xml strucure. So I just want to display in XSL a simple...
by: Sebarry | last post by:
Hi, I'm doing some work for a German website. They want to be able to type in characters for which there are HTML entities like &Uuml; &uuml; &auml;. The plain text should be stored in a database so it can be later retrieved and read into an XML file. The XML file is read by a Flash file to create a news ticker. Unfortunately the ticker is displaying some characters incorrectly. I thought that you would need to use html_entities when...
by: rajana | last post by:
Dear All, We have Ansi file with german characters (Ä / Ø) , We are using Streamreader to read the contents of the file. But Readline() not able to read the German characters. We tried all possibilities of calling the streamreader, but nothing worked. Dim sr As StreamReader = New StreamReader(Filename, System.Text.Encoding.Default, True) Dim sr As StreamReader = New StreamReader(Filename, _System.Text.Encoding.ASCII, False, 512)
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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...
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...
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...
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 project—planning, coding, testing, and deployment—without 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...
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...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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

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.