Jump to content


Problem With Double Byte Characters On Fusion Charts


  • Please log in to reply
2 replies to this topic

#1 Santosh Balid

Santosh Balid

    Junior Member

  • Members
  • PipPip
  • 11 posts

Posted 09 May 2012 - 05:06 AM

Hello,

I want to show double byte chatacters on tab of extjs, but i have problem with this.

I got solution for the same problem with accented characters by passing hexadecimal value through url.


e.g passing these value

<Resource locale="de-DE" code="cc-anal-r-casesbymonth">
<Const name="xAxisName" value="Monat" />
<Const name="yAxisName" value="Anzahl der Vorgänge" />
<Const name="seriesName1" value="Geöffnet" />
<Const name="seriesName2" value="Geschlossen" />
<Const name="drillDownTitle" value="Vorg%E4nge nach Monat" />
<Coldef name="monthName" label="Kategorie" />
<Coldef name="OpenSeries" label="Datensatz" />
<Coldef name="CloseSeries" label="Datensatz" />
</Resource>


To the function

<![CDATA[
<set seriesname="[$seriesName2$]">
<xsl:variable name="queryString" select="concat('statusvar=Close&amp;analflag=1&amp;begindate=', sw:F(., 'fromdate'),'&amp;[*filter*]&amp;dateType=[*dateCriteria*]')"/>
<xsl:attribute name="value">
<xsl:value-of select="sw:F(.,'Closed')"/>
</xsl:attribute>
<xsl:attribute name="link">j-filterConsole("[$drillDownTitle$],cc rpt r daterange, <xsl:value-of select="$queryString"/>")</xsl:attribute>
</set>
]]>
</Xsl>

is working fine for accented characters , but having problem with double byte characters.

refer==> accentedCHAR.jpg


But when i do same with double byte charactes it shows garbage value on the Tab.

e,g

Passing these value



<Resource locale="zh-CN" code="cc-anal-r-casesbymonth">
<Const name="xAxisName" value="月"/>
<Const name="yAxisName" value="个案数量"/>
<Const name="seriesName1" value="打开"/>
<Const name="seriesName2" value="已关闭"/>
<Const name="drillDownTitle" value="按月排列个案"/>
<Coldef name="monthName" label="类别"/>
<Coldef name="OpenSeries" label="数据集"/>
<Coldef name="CloseSeries" label="数据集"/>
</Resource>

To the same function


<![CDATA[
<set seriesname="[$seriesName2$]">
<xsl:variable name="queryString" select="concat('statusvar=Close&amp;analflag=1&amp;begindate=', sw:F(., 'fromdate'),'&amp;[*filter*]&amp;dateType=[*dateCriteria*]')"/>
<xsl:attribute name="value">
<xsl:value-of select="sw:F(.,'Closed')"/>
</xsl:attribute>
<xsl:attribute name="link">j-filterConsole("[$drillDownTitle$],cc rpt r daterange, <xsl:value-of select="$queryString"/>")</xsl:attribute>
</set>
]]>
</Xsl>

but it shows garbage value on tab instead of double byte characters

.

Please refer screenshot==>
doublebyteChar.jpg

in this screenshot it shows garbage value insteas of 按月排列个案 value of <Const name="drillDownTitle" value="按月排列个案"/>

I solved the same problem for accented characters by passing hexadecimal value of it with % sign infront of it e.g [ <Const name="drillDownTitle" value="Vorg%E4nge nach Monat" />
]. i used %E4 insted of ä
Please suggest the solution for the same issue for double byte characters i.e how i encode these characters

waiting for your reply.....accentedCHAR.JPG doublebyteChar.JPG


Thanks & Regards,
Santosh.

Edited by Santosh Balid, 09 May 2012 - 05:18 AM.


#2 Santosh Balid

Santosh Balid

    Junior Member

  • Members
  • PipPip
  • 11 posts

Posted 10 May 2012 - 04:46 AM

Hello,

I want to show double byte chatacters on tab of extjs, but i have problem with this.

I got solution for the same problem with accented characters by passing hexadecimal value through url.


e.g passing these value

<Resource locale="de-DE" code="cc-anal-r-casesbymonth">
<Const name="xAxisName" value="Monat" />
<Const name="yAxisName" value="Anzahl der Vorgänge" />
<Const name="seriesName1" value="Geöffnet" />
<Const name="seriesName2" value="Geschlossen" />
<Const name="drillDownTitle" value="Vorg%E4nge nach Monat" />
<Coldef name="monthName" label="Kategorie" />
<Coldef name="OpenSeries" label="Datensatz" />
<Coldef name="CloseSeries" label="Datensatz" />
</Resource>


To the function

<![CDATA[
<set seriesname="[$seriesName2$]">
<xsl:variable name="queryString" select="concat('statusvar=Close&amp;analflag=1&amp;begindate=', sw:F(., 'fromdate'),'&amp;[*filter*]&amp;dateType=[*dateCriteria*]')"/>
<xsl:attribute name="value">
<xsl:value-of select="sw:F(.,'Closed')"/>
</xsl:attribute>
<xsl:attribute name="link">j-filterConsole("[$drillDownTitle$],cc rpt r daterange, <xsl:value-of select="$queryString"/>")</xsl:attribute>
</set>
]]>
</Xsl>

is working fine for accented characters , but having problem with double byte characters.

refer==> accentedCHAR.jpg


But when i do same with double byte charactes it shows garbage value on the Tab.

e,g

Passing these value



<Resource locale="zh-CN" code="cc-anal-r-casesbymonth">
<Const name="xAxisName" value="月"/>
<Const name="yAxisName" value="个案数量"/>
<Const name="seriesName1" value="打开"/>
<Const name="seriesName2" value="已关闭"/>
<Const name="drillDownTitle" value="按月排列个案"/>
<Coldef name="monthName" label="类别"/>
<Coldef name="OpenSeries" label="数据集"/>
<Coldef name="CloseSeries" label="数据集"/>
</Resource>

To the same function


<![CDATA[
<set seriesname="[$seriesName2$]">
<xsl:variable name="queryString" select="concat('statusvar=Close&amp;analflag=1&amp;begindate=', sw:F(., 'fromdate'),'&amp;[*filter*]&amp;dateType=[*dateCriteria*]')"/>
<xsl:attribute name="value">
<xsl:value-of select="sw:F(.,'Closed')"/>
</xsl:attribute>
<xsl:attribute name="link">j-filterConsole("[$drillDownTitle$],cc rpt r daterange, <xsl:value-of select="$queryString"/>")</xsl:attribute>
</set>
]]>
</Xsl>


The double byte characters are not reaces to the following js function


function filterConsole(chartParams) {
var params;
var filterObj = {};
var scope = getFilterConsoleScope();

if (scope && scope.filterConsole) {
params = chartParams.split(",");
if (params.length >= 3) {
filterObj.title = params[0].replace(/^\s/, "").replace(/\s$/, "");
filterObj.code = params[1].replace(/^\s/, "").replace(/\s$/, "").replace(/\s/g, "-");
filterObj.queryString = params[2].replace(/^\s/, "").replace(/\s$/, "");
if (params.length === 4) {
filterObj.id = params[3].replace(/^\s/, "").replace(/\s$/, "").replace(/\s/g, "-");
}
scope.filterConsole(filterObj);
}
}
}

It shows garbage value on tab instead of double byte characters

.

Please refer screenshot==>
doublebyteChar.jpg

in this screenshot it shows garbage value insteas of 按月排列个案 value of <Const name="drillDownTitle" value="按月排列个案"/>

I solved the same problem for accented characters by passing hexadecimal value of it with % sign infront of it e.g [ <Const name="drillDownTitle" value="Vorg%E4nge nach Monat" />
]. i used %E4 insted of ä
Please suggest the solution for the same issue for double byte characters i.e how i encode these characters

waiting for your reply.....accentedCHAR.JPG doublebyteChar.JPG


Thanks & Regards,
Santosh.







#3 Rishi Choudhari

Rishi Choudhari

    Junior Member

  • Members
  • PipPip
  • 19 posts

Posted 14 May 2012 - 09:45 AM

how does fusioncharts come into the picture?

it is a bit unclear from the code that you provided..