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)
iwextattr with French characters
parsan99
Hello
On TeamSite 6, Solaris, we use Metatagger to set extended attributes with French characters. While reading the extended attributes using "iwextattr -g", I see some garbled output. I have confirmed that this is not something caused due to my ssh session. The session is printing utf8 output without issues.
Here's a test acript..
#!../../iw-perl/bin/iwperl
use utf8;
my $targetFile = "/default/main/../testFile";
my $ea = `/export/local/teamsite/iw-home/bin/iwextattr -u -g "TeamSite/Metadata/ARTICLE_BODY/0/Segment" "$targetFile"`;
print $ea;
And this is the ouput I get from the script -
LâAméricain Dell Computer a rappelé vendredi (16 décembre) près de 35 000 batteries dâordinateurs portables, indiquant que les unités défectueuses pouvaient surchauffer et prendre feu.
The actual output I see in "File Properties" (CCPRO) for the extended attribute is
L’Américain Dell Computer a rappelé vendredi (16 décembre) près de 35 000 batteries d’ordinateurs portables, indiquant que les unités défectueuses pouvaient surchauffer et prendre feu.
Please let me know if I am missing something here.
Thanks in advance for the help!
Find more posts tagged with
Comments
brandon1
Think you are missing that fact that you need to decode the string.
utf8::decode($string) before you print it.
Current Project: TS 6.1
Environment: Windows
parsan99
Thanks a lot for the hint!. I was able to get it working using Encode:decode_utf8.