简体   繁体   English

Python:解码NLS编码的文本

[英]Python: Decoding NLS encoded text

I'm using a Corba library where the target returns error messages with NLS encoding. 我正在使用Corba库,其中目标返回具有NLS编码的错误消息。 eg: wideNlsText=u'$NLS[30822b0b\\x01888\\x01$NLS[30822ae5\\x013\\x01Subscriber NPA]NLS$]NLS$' 例如:wideNlsText = u'$ NLS [30822b0b \\ x01888 \\ x01 $ NLS [30822ae5 \\ x013 \\ x01Subscriber NPA] NLS $] NLS $'

Other than $NLS starts and NLS$ ends the string, what can I do to translate these into a more acessable text string? 除了$ NLS开始和NLS $结束字符串之外,我该怎么做才能将它们转换为更易于访问的文本字符串?

Apologies all, 抱歉,

Further reading of the documentation says: 进一步阅读文档说明:

The XXXX Server provides National Language Support (NLS) for all string values returned across the CORBA API. XXXX服务器为通过CORBA API返回的所有字符串值提供本国语言支持(NLS)。 The client application specifies the locale of these strings by calling the setNLSLocale method. 客户端应用程序通过调用setNLSLocale方法来指定这些字符串的语言环境。 If the locale is not set the string values are returned as NLS identifiers that are not interpretable by the client application. 如果未设置语言环境,则字符串值将作为客户端应用程序无法解释的NLS标识符返回。 Future releases will provide an additional interface for interpreting these NLS identifiers (see Future releases). 将来的版本将提供用于解释这些NLS标识符的附加接口(请参阅将来的版本)。 The client application can query the NLS locale by calling getNLSLocale. 客户端应用程序可以通过调用getNLSLocale查询NLS语言环境。

Please consider the question closed 请考虑问题已关闭

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM