Weird characters

Post Reply
gaurav.shetti
Posts: 119
Joined: Fri Feb 27, 2009 9:09 am

Weird characters

Post by gaurav.shetti »

I am getting weird characters in my xml which is breaking the entire xml.
EG
for �Thomas,� returns no results when matching last, first Search for �Thomas, James H� returns no results when matching last, first Search �Shaffer, K� in.

The above eg is stored within a variable $test. Now i am printing the vairable as <fmt %H $test>. Still it is not decoding the special characters. any idea how to decode them and show them as normal characters
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Weird characters

Post by mark »

Try "%hhV" to make XML safe output.
gaurav.shetti
Posts: 119
Joined: Fri Feb 27, 2009 9:09 am

Weird characters

Post by gaurav.shetti »

What does hh stand for ?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Weird characters

Post by mark »

http://www.thunderstone.com/site/vortex ... flags.html

h For %!V (UTF-8 decode) and %v (UTF-16 encode): if given once, HTML-escapes out-of-range (over 255 for %!V , over 0x10FFFF for %v) characters instead of replacing with ?. For %V (UTF-8 encode) and %!v (UTF-16 decode): if given once, unescapes HTML sequences first; this allows characters that are out-of-range in the input encoding to be represented natively in the output encoding.

For %V, %!V, %v and %!v, if given twice (eg hh), also HTML-escapes low (7-bit) values (eg. control chars, <, >) in the output. Added in version 3.01.969000000 20000914. (The h flag is also used as a sub-flag for Metamorph mark-up, here.)
Post Reply