Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
remove junk characters
rodigz
Hi,
I re-created my dct and from the item names I'm getting junk characters which makes the DCR an parsable.
Each attached image. I can't even copy and patse the junk characters.
I tried some pattern matching but does not work. Anyone encounter this before.
thanks.
Find more posts tagged with
Comments
jbonifaci
Try removing them with this regex and see if the problem goes away:
s|[^\x00-\x80]||g
~Jeff
Adam Stoller
What you posted a screenshot of was a DCR not a DCT.
How did you "recreate" your DCT?
Did you touch your DCRs? If so - how?
What version of TeamSite? What platform?
The DCR appears to be in Spanish (quick look, apologies if wrong) - and I'm guessing makes use of UTF-8 characters.
What is the encoding specified at the top of the DCT? at the top of the DCR?
What program are you using to look athe DCR (when you took that screenshot)?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
rodigz
thanks but stil does'not removed the junk characters.
$variable_container_name =~ s|[^\x00-\x80]||g;
rodigz
the version that i'm using is teamsite 6.5 in windows.
yes it is utf-8. I have perl module that will recreate dcr.
$writer->xmlDecl("UTF-8");
$writer->doctype("record", '', "dcr4.5.dtd");
$writer->startTag("record",
"name" => "$recordname",
"type" => "content");
jbonifaci
Another option is rather than try to go after the specific characters, go after all characters that aren't what you want. If you only want letters, numbers and underscores in your names, eliminate everything but them:
s|[^A-Z0-9_]||gi;
~Jeff
rodigz
yeah..it work. u rock..thank u.