|
-
November 29th, 2005, 09:08 AM
#1
Unicode replace...?
Hi,
I'm retrieving a product write up from an external system, the write up often contains invalid characters that don't display correctly in my UI. The characters are GRAVE ACCENT and ACUTE ACCENT, which translate to unicode 145 and 146 - they just turn into square boxes.
How can I replace the characters in a string, is there a regular expression that can do this specific task..? Or is it something like...
Code:
_writeUp.Replace("\u00145", "'");
_writeUp.Replace("\u00146", "'");
Thanks
If it helped, then please rate the post by clicking "Rate this post"!
-
November 29th, 2005, 09:27 AM
#2
Re: Unicode replace...?
The \u or \U escape sequence expects a 2 byte hexadecimal digit:
Code:
_writeUp = _writeUp.Replace("\u0091", "'");
_writeUp = _writeUp.Replace("\u0092", "'");
- petter
-
November 29th, 2005, 09:34 AM
#3
Re: Unicode replace...?
If it helped, then please rate the post by clicking "Rate this post"!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|