How can I show the following text in html textarea?

Hi has a line as shown below. Please take a look.

image

I put this as an image, it is not displayed either. If I put this line here, it will be next.

 21154537878887GHE\u0044\u0045

Now my question is, is there a way to put the source string in html textarea without changing the encoding?

+4
source share
4 answers

I think you should define your char set in the head.

<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>untitled</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="denis kohl">
<!-- Date: 2014-09-04 -->
</head>
<body>

 

0
source

Try adding an attribute accept-charset="UTF-8"to an HTML form element that contains a text field. Then parse the encoded value using JavaScript. For instance:

HTML:

<form accept-charset="UTF-8">
    <textarea id="textBox"></textarea>
</form>

JavaScript:

document.getElementById("textBox").value = "21154537878887GHE\u0044\u0045";
0
source
<textarea name="Input" cols="36" rows="5" wrap="virtual">

wrap, :

wrap: off, virtual, hard, physical, soft

Textarea , . , Textarea - .

, CGI ( ) MIME , MIME "" /html ", HTML, . , HTML Textarea MIME" text/plain", Textarea .

<meta http-equiv="Content-Type" content="text/plain; charset=utf-8">

, , .

0

:

<textarea>2&#002;11&#001c;5&#0002;45&#001c;3&#0002;788&#0019;87&#0019;GH&#0019;E\u0044\u0045</textarea>

, , , , , ( css) , , Unicode BMP Fallback Font (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=UnicodeBMPFallbackFont), , . .

0

All Articles