<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1256">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>HI <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I am doing a simple thing. I have a map file and trying to show
some static text in Arabic on map. You can try this with any map file as it is nothing
to do with layers from map.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>At run time (like on a button click), please add this<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                <span style='color:#2B91AF'>layerObj</span>
lyr = <span style='color:blue'>new</span> <span style='color:#2B91AF'>layerObj</span>(mapObj);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                lyr.name = <span style='color:#A31515'>&quot;TextAcetate”</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                lyr.status = <span style='color:
#2B91AF'>mapscript</span>.MS_ON;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                lyr.type = <span style='color:#2B91AF'>MS_LAYER_TYPE</span>.MS_LAYER_ANNOTATION;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                lyr.labelcache = <span
style='color:#2B91AF'>mapscript</span>.MS_TRUE;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                <span style='color:blue'>double</span>
locationX = 50;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>               
<span style='color:blue'>double</span> locationY = 50;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:10.0pt;font-family:"Courier New"'>lyr.transform = (<span
style='color:blue'>int</span>)<span style='color:#2B91AF'>mapscript</span>.MS_FALSE;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:10.0pt;font-family:"Courier New";color:#2B91AF'>classObj</span><span
style='font-size:10.0pt;font-family:"Courier New"'> layerClass = <span
style='color:blue'>new</span> <span style='color:#2B91AF'>classObj</span>(lyr);<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>//All
label properties<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:10.0pt;font-family:"Courier New"'>layerClass.label.size = 15;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:10.0pt;font-family:"Courier New"'>layerClass.label.type =<span
style='color:#2B91AF'> MS_FONT_TYPE</span>.MS_TRUETYPE;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:10.0pt;font-family:"Courier New"'>…<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:10.0pt;font-family:"Courier New"'>…<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:10.0pt;font-family:"Courier New"'>layerClass.label.encoding = “CP1256”;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                <span style='color:#2B91AF'>shapeObj</span>
shpObj = <span style='color:blue'>new</span> <span style='color:#2B91AF'>shapeObj</span>((<span
style='color:blue'>int</span>)<span style='color:#2B91AF'>MS_SHAPE_TYPE</span>.MS_SHAPE_POINT);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                <span style='color:#2B91AF'>lineObj</span>
lnObj = <span style='color:blue'>new</span> <span style='color:#2B91AF'>lineObj</span>();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                <span style='color:#2B91AF'>pointObj</span>
pt = <span style='color:blue'>new</span> <span style='color:#2B91AF'>pointObj</span>(locationX,
locationY, 0, 0);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                lnObj.add(pt);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                shpObj.add(lnObj);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>                shpObj.text = “</span><span
lang=AR-AE dir=RTL style='font-size:10.0pt;font-family:"Courier New"'>áÞÞÇÝÚÚÚììÉÉæäå</span><span
dir=LTR></span><span style='font-size:10.0pt;font-family:"Courier New"'><span
dir=LTR></span>”; //I actually get this (in arabic) through user input<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>               
lyr.addFeature(shpObj);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>mapObj.draw();
//Onto a picture box or save as file<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>(In the map file, my output format is set to GD/PNG)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Please let me know if you need more information.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Murty<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Tamas
Szekeres<br>
<b>Sent:</b> Friday, February 06, 2009 4:12 PM<br>
<b>To:</b> Murty Maganti<br>
<b>Cc:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [mapserver-users] Encoding issues<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>Please send me your example so
that I could examine what's going on.<br>
<br>
Best regards,<br>
<br>
Tamas<br>
<br>
<br>
<o:p></o:p></p>

<div>

<p class=MsoNormal>2009/2/6 Murty Maganti &lt;<a
href="mailto:MMaganti@oriongis.com">MMaganti@oriongis.com</a>&gt;<o:p></o:p></p>

<div>

<div>

<p><span style='font-size:11.0pt;color:#1F497D'>Hi</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>I tried with the suggested
encoding but still no success.</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>From the output below, I guess
ICONV support is included.</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>E:\Utils\MapServer\Map Server
5.2 RC\ms4w\Apache\cgi-bin&gt;mapserv -v</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>MapServer version 5.2.0
OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;OUTPUT=SWF OUTPUT=SVG
SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE <b>SUPPORTS=ICO</b></span><o:p></o:p></p>

<p><b><span style='font-size:11.0pt;color:#1F497D'>NV</span></b><span
style='font-size:11.0pt;color:#1F497D'> SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUP</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>PORTS=THREADS SUPPORTS=GEOS
SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;INPUT=GDAL INPUT=SHAPEFILE</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>Where can get some details on
how to build the C# mapscript (Managed assembly only) from Visual Studio,
keeping all unmanaged dlls from binaries from ms4w. I just want to give a try
using MarshalAsAttribute.</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>Thanks</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>Murty</span><o:p></o:p></p>

<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'>

<p><b><span style='font-size:10.0pt'>From:</span></b><span style='font-size:
10.0pt'> Tamas Szekeres [mailto:<a href="mailto:szekerest@gmail.com"
target="_blank">szekerest@gmail.com</a>] <br>
<b>Sent:</b> Friday, February 06, 2009 3:02 PM<br>
<b>To:</b> Murty Maganti<br>
<b>Cc:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [mapserver-users] Encoding issues</span><o:p></o:p></p>

</div>

<div>

<div>

<p>&nbsp;<o:p></o:p></p>

<p style='margin-bottom:12.0pt'>Hi,<br>
<br>
You might want to try with encoding=&quot;ISO-8859-6&quot; assuming you have
libiconv compiled in.<br>
The c# mapscript doesn't specify explicit conversion during the marshaling. In
this case I assume an unicode to Charset.Ansi conversion will automatically
takes place by default.<br>
<br>
Best regards,<br>
<br>
Tamas<br>
<br>
<br>
<br>
<o:p></o:p></p>

<div>

<p>2009/2/6 Murty Maganti &lt;<a href="mailto:MMaganti@oriongis.com"
target="_blank">MMaganti@oriongis.com</a>&gt;<o:p></o:p></p>

<div>

<div>

<p>Hello <o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>I am having some issues using Arabic text as labels. I am using C# map
script. I am setting the following at runtime<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>labelObj label = classObj.label;<o:p></o:p></p>

<p>label.encoding = &quot;CP1256&quot;;<o:p></o:p></p>

<p>label.text = &quot;some text in Arabic&quot;; (At rune time in VS, I can see
the text is actually in Arabic)<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>But labels are displayed as '?????'.<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>&nbsp;Is there any conversion I need to do before setting the text value.
How are the string represented in the underlying mapscript dll (ASCII or
Unicode?). As I was reading in the MSDN, the default marshalling uses LPStr
which is a single byte of ASCII. Does it mean that first I need to convert from
Unicode to ASCII in C# before setting the value.<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>Appreciate any help.<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>Thanks<o:p></o:p></p>

<p>Murty<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

</div>

</div>

<p style='margin-bottom:12.0pt'><br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></p>

</div>

<p>&nbsp;<o:p></o:p></p>

</div>

</div>

</div>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>