SharePoint 中的内部名称编码 [英] Internal name encoding in SharePoint

查看:28
本文介绍了SharePoint 中的内部名称编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

_x0020_ 替换 SharePoint 内部字段名称中的空格是众所周知的知识.使用 SharePoint Web 服务时,这可能有点像一场噩梦,直到​​您在比较字段名称时编写替换规则.

It's pretty well publicised knowledge that _x0020_ replaces spaces in SharePoint internal field names. When working with SharePoint web services this can be a bit of a nightmare until you write a replace rule when comparing field names.

我刚刚在名为 SSL2 的字段中发现了另一个编码异常".奇怪的是,内部名称以 _x0053_SL2 结尾.我尝试过类似 RRL2 的东西,它以 _x0052_ 的形式出现.由此看来,编码中使用的数字表示该字符的 ASCII 值.空格同样是 _x0020_.

I've just found myself another one of these "encoding exceptions" in a field called SSL2. Bizarrely the internal name ends out being _x0053_SL2. I've tried something like RRL2 which comes out as _x0052_. From this it appears that the number used in the encoding represents the ASCII value of that character. Space would likewise be _x0020_.

我的问题有两个:

  1. 在这种情况下,是什么导致 SharePoint 编码这些字符.

大致来说,正在做什么样的编码,是否有一个通用的我可以做的步骤来解码字符串而不是替换特定的我遇到的事件并知道这是一个问题.

推荐答案

你应该使用 System.Xml.XmlConvert.DecodeName

You should use System.Xml.XmlConvert.DecodeName

这篇关于SharePoint 中的内部名称编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆