ASP.NET Multiline textbox allowing input above UTF-8?

Just to add some clarification... UTF-8 is a character encoding scheme that covers all Unicode characters. Therefore there isn't any such thing as a "non UTF-8 character The encoding of a string has nothing to do with the graphical representation of those characters on the screen (e.g. In a web page's or controls). In your example, some fonts display the typographer's quotes as straight quotes while others display the very same UTF-8 character as curly quotes The ResponseEncoding setting determines what bytes are transmitted to represent the characters that make up the HTML of your page and the characters encoded in form posts and URLs back to your page.

Common encodings are UTF-8, ISO 8859-1 and windows-1252. These encodings have a lot of similarities, but they also have their differences. However, you can deliver the very same page using the windows-1252 character set and encoding (which also includes those curly quote characters) and you'd see exactly the same result So in a nutshell, don't confuse character encoding with font styles By the way, your ResponseEncoding="utf-8" directive is redundant since the same thing is set in web.config.

And UTF-8 is the default anyway, so you may not even need it in your web.config.

Just to add some clarification... UTF-8 is a character encoding scheme that covers all Unicode characters. Therefore there isn't any such thing as a "non UTF-8 character. " The encoding of a string has nothing to do with the graphical representation of those characters on the screen (e.g.In a web page's or controls).

In your example, some fonts display the typographer's quotes as straight quotes while others display the very same UTF-8 character as curly quotes. The ResponseEncoding setting determines what bytes are transmitted to represent the characters that make up the HTML of your page and the characters encoded in form posts and URLs back to your page. Common encodings are UTF-8, ISO 8859-1 and windows-1252.

These encodings have a lot of similarities, but they also have their differences. However, you can deliver the very same page using the windows-1252 character set and encoding (which also includes those curly quote characters) and you'd see exactly the same result.So in a nutshell, don't confuse character encoding with font styles. By the way, your ResponseEncoding="utf-8" directive is redundant since the same thing is set in web.config.

And UTF-8 is the default anyway, so you may not even need it in your web.config.

Thanks Mike. I figured they were redundant, I just wanted to show that I had done everything I had found in my research. Great explanation.

– Justin C Feb 14 '10 at 0:00.

What you are seeing is the different default fonts that are applied to the text area (multiline textbox) verse textbox (input). Text areas use Courier New and single line textboxes use Arial. If you apply a style that sets the font-family to be the same for both the textbox and the textarea then your pasted text will match.

Try these and you should see that the pasted contents all match exactly.

Interesting, I would have thought the settings at the web. Config level and the Page Directive would pass those settings along to all controls when the ASP is turned into html. Thanks Jeff, I'll give this a shot.

– Justin C Feb 10 '10 at 2:47 hmmmm... I don't think you can set font-family in the web. Config or the Page Directive. You could set font-family in a global css style sheet if you want to.

What settings are you thinking that you set in web. Config that would change the font-family of the textbox? – Jeff Widmer Feb 10 '10 at 9:21 The tag at the very beginning.It's "globilization", it's a section of the web.

Config . I got that information from the following MSDN article: msdn.microsoft.Com/en-us/library/39d1w2xf. Aspx – Justin C Feb 10 '10 at 21:49 Globalization does not drive the font that is used.

The font comes strictly from the styles that are set on the page (or the default style of the text boxes). Globalization would come into play when displaying dates or currency (what order is the month, day, year specified or is a comma or period used to separate dollars from cents, etc. ). The font that is used to display the text in a text box is not from the globalization settings.

– Jeff Widmer Feb 10 '10 at 17:27.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions