开发者

Convert Multi Byte character into Hex

I have an incoming file that will pass a Bi开发者_高级运维zTalk mapper. I need to identify if there is a 3byte chinese character in one of the field of the file (file is an xml). I already got an idea how to find the 3 byte character. However, How can I convert this into its Hex Value? The Hex value is that I will send to the output schema then send to a DB2 server.


I'm assuming your are dealing with UTF-8. Is that true?

If so, you want something like:

((c0 & 0xFFFF) << 12) | ((c1 & 0xFFFFFF) << 6) | (c2 & 0xFFFFFF)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜