久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

sql studio 看不到 XML 中的特殊字符

sql studio can#39;t see special characters in XML(sql studio 看不到 XML 中的特殊字符)
本文介紹了sql studio 看不到 XML 中的特殊字符的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

出于某種原因,當(dāng)我查詢 XML 字段時(shí),Visual Studio 沒(méi)有向我顯示特殊字符.也許我存儲(chǔ)錯(cuò)誤?這些是明智的報(bào)價(jià)

For some reason Visual Studio does not show me special characters when I query for an XML field. Maybe I stored them wrong? These are smart quotes

這是查詢:

select CustomFields from TABLE where ID=422567 FOR XML PATH('')

當(dāng)我復(fù)制/粘貼到記事本++時(shí),我看到:

When I copy/paste into notepad++ I see this:

什么是 STS 和 CCH?

What are STS and CCH?

推薦答案

字符串 - 正如您肯定知道的 - 只是數(shù)字鏈.它們的含義和解釋方式取決于代碼頁(yè)、編碼、小端或大端...

Strings are - as you surely know - just chains of numbers. What they mean and how they are interpreted is depending on codepages, encodings, little or big endian ...

看看這個(gè)

SELECT 'test' AS NormalText

       --non printable characters
       --they are things like backspace, carriage return
      ,CHAR(0x6) AS ACK    --DEC   7
      ,CHAR(0x7) AS BEL    --DEC   9
      ,CHAR(0x1A) AS CR    --DEC  13
      ,CHAR(0x1B) AS ESC   --DEC  27

      --printable characters from 0x21 (DEC 33) up to 0x7F (DEC 127) - (almost) not depending on encoding
      ,CHAR(0x41) AS BigA  --DEC  65
      ,CHAR(0x7E) AS Tilde --DEC 126

      --extended - from 0x80 (DEC 128) - very much depending on encoding!
      ,CHAR(0x93) AS STS   --DEC 147
      ,CHAR(0x94) AS CCH   --DEC 148
      ,CHAR(0x93) + 'test' + CHAR(0x94) AS Mixed
FOR XML PATH('')

這將產(chǎn)生這個(gè)

<NormalText>test</NormalText>
<ACK>&#x6;</ACK>
<BEL>&#x7;</BEL>
<CR>&#x1A;</CR>
<ESC>&#x1B;</ESC>
<BigA>A</BigA>
<Tilde>~</Tilde>
<STS>"</STS>
<CCH>"</CCH>
<Mixed>"test"</Mixed>

如您所見(jiàn),有些字符必須編碼,因?yàn)樗鼈儧](méi)有字符表達(dá),其他的則顯示相應(yīng)的圖片".

As you see, there are characters which must be encoded, as there is no character expression for them, others are displayed with their corresponding "picture".

如果代碼高于 DEC 127,您將進(jìn)入危險(xiǎn)地帶.相同的字符串可能會(huì)產(chǎn)生完全不同的輸出,具體取決于您閱讀的位置.

With codes above DEC 127 you enter dangerous terrain. The same string can produce quite different output depending on where you read it.

向您展示的STS"和CCH"記事本取自 C1 控制和 Latin-1 補(bǔ)充.

The "STS" and "CCH" Notepad shows to you, are taken from C1 Controls and Latin-1 Supplement.

This 和您示例中的書(shū)面 Smart qoutes 指向 this.為了允許smart qoutesstartend 的通用字符被替換"為合適的打開(kāi)和關(guān)閉qoutation 標(biāo)記.

This, and the written Smart qoutes in your example point to this. In order to allow smart qoutes there are general characters for start and end which are "replaced" with the fitting opening and closing qoutation marks.

最后,SQL Server 中的 XML 始終是 UTF16.看看這個(gè) feff0093 和 feff0094.這些是 UTF16 綁定到 0x930x94 的標(biāo)志.我的小例子清楚地表明了這一點(diǎn)......

Finally XML in SQL Server is always UTF16. Have a look at this feff0093 and feff0094. These are the signs UTF16 binds to 0x93 and 0x94. My small example shows this clearly...

那么問(wèn)題是:為什么你的圖片沒(méi)有顯示"?

So the question is: Why does your picture not show the " and the " ?

我不知道...您放在第一行的 select 不會(huì)生成"這個(gè) XML,而是從CustomFields"列中取出現(xiàn)有的 XML.我相當(dāng)確定,這不是真正的"XML 列...

I don't know... The select you put in the first line would not "produce" this XML, it rather takes existing XML out of a column "CustomFields". I'm fairly sure, that this is not a "real" XML-column...

這篇關(guān)于sql studio 看不到 XML 中的特殊字符的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

What SQL Server Datatype Should I Use To Store A Byte[](我應(yīng)該使用什么 SQL Server 數(shù)據(jù)類型來(lái)存儲(chǔ)字節(jié) [])
Interpreting type codes in sys.objects in SQL Server(解釋 SQL Server 中 sys.objects 中的類型代碼)
Typeorm Does not return all data(Typeorm 不返回所有數(shù)據(jù))
Typeorm .loadRelationCountAndMap returns zeros(Typeorm .loadRelationCountAndMap 返回零)
How to convert #39;2016-07-01 01:12:22 PM#39; to #39;2016-07-01 13:12:22#39; hour format?(如何將“2016-07-01 01:12:22 PM轉(zhuǎn)換為“2016-07-01 13:12:22小時(shí)格式?)
MS SQL: Should ISDATE() Return quot;1quot; when Cannot Cast as Date?(MS SQL:ISDATE() 是否應(yīng)該返回“1?什么時(shí)候不能投射為日期?)
主站蜘蛛池模板: 亚洲精色 | 欧美日韩一区二区三区在线观看 | 久久国产一区二区 | 成人在线国产 | 中文字幕亚洲欧美 | 国产精品特级片 | 亚洲一区二区三区观看 | 亚洲系列第一页 | 黄色在线观看 | 国产免费一区二区三区网站免费 | 久久精品亚洲精品 | 男人天堂手机在线视频 | 精品一区二区三区四区五区 | 韩国av一区二区 | 色综合色综合 | 国产成人亚洲精品 | 亚洲国产成人精品女人 | 狠狠干天天干 | 欧美日日 | 亚洲欧美日韩久久久 | 免费在线观看av | 97精品国产97久久久久久免费 | 久热精品在线观看视频 | 日韩三级在线 | 亚洲欧美日韩中文字幕一区二区三区 | 国产日韩精品久久 | 综合另类| h视频在线免费 | 人人干视频在线 | 中文字幕在线播放不卡 | 欧美激情视频一区二区三区在线播放 | 免费久| 日韩中文字幕一区二区 | 亚洲区在线| 亚洲一区久久 | 国产成人在线视频免费观看 | 亚洲在线电影 | 精品少妇v888av | 久热m3u8 | 密乳av | 精品一区二区三区在线观看 |