简体   繁体   中英

Decode MS Office double quote character?

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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