开发者

Decode MS Office double quote character?

开发者 https://www.devze.com 2023-03-05 14:58 出处:网络
I need to开发者_高级运维 decode and encode the MS Office double quote character. I used escape and unescape function in JavaScript to escape the MS Office double quote character but I couldn\'t use it

I need to开发者_高级运维 decode and encode the MS Office double quote character. I used escape and unescape function in JavaScript to escape the MS Office double quote character but I couldn't use it in Java. How do I do this in Java?

  • MS Office double quote:
  • Double quote got from keyboard: "


MS Office uses the valid and legitimate Unicode characters U+201C LEFT DOUBLE QUOTATION MARK () and U+201D RIGHT DOUBLE QUOTATION MARK (). Strictly speaking those are more correct, grammatically, than U+0022 QUOTATION MARK (").

Unless you're working with some legacy systems that don't support Unicode strings, replacing them should be trivial (for example using String.replace("“", "\"") in Java).

0

精彩评论

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