Page 1 of 1

Weird characters

Posted: Fri Sep 03, 2010 10:30 am
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

Weird characters

Posted: Fri Sep 03, 2010 4:51 pm
by mark
Try "%hhV" to make XML safe output.

Weird characters

Posted: Tue Sep 07, 2010 6:35 am
by gaurav.shetti
What does hh stand for ?

Weird characters

Posted: Tue Sep 07, 2010 10:12 am
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.)