hi,
kindly verify, the ExecuteQuery returns garbage if the data being retrieve is arabic.
i have tried to change the ShapeFileFeatureSource encoding to utf8 and unicode with no success:
.Encoding= System.Text.Encoding.Unicode
.Encoding= System.Text.Encoding.UTF8
running on mvc ver 7.
thanks
rhandy
Possibly bug on ExecuteQuery on arabic data retrieval
Hi Rhandy,
Thanks for your post, we have tried to recreate the problem, but it didn’t show up wiht our test data, attached is the test sample, would you please check it, and tell us what we missed? And would you please tell us more information about the dlls version and your culture info?
Waiting for your further inforamtion.
Summer
post11336.zip (13.9 KB)
Hi Summer,
Thanks for the reply, the curltureinfo is ‘ar-SA’. Please check the attached snapshots where:
1. sample.png
- feature encoding is not applied.
- arabic data still show garbage.
2. sample2.png
- feature encoding is forced applied.
- arabic data still show garbage.
3. sample3.png
- feature encoding is forced applied.
- different approach but not what i wanted.
- arabic data is okay.
running on:
-os: windows 7
-language for non-unicode app: arabic (saudi arabia)
-ide: visual studio 2010
-mapsuite: mvc 7.0
Regards,
Rhandy
002_sample.png (64.4 KB)
001_sample2.png (58.5 KB)
sample3.png (77.3 KB)
Hi Rhandy,
Thanks to let us know that and attach detail information, which is really helpful.
I think that maybe a bug but it’s strange because we assigned Encoding to our engine when featuresrouce.Open() in code.
I haven’t found a good data for test, could you please help us to upload your light pois.shp filecontains at least one arabic data so we can fix this quickly.
Regards,
Don
Hello Don,
Thanks for the reply, please find the attached .zip file contains a slim-down POI’s.
Hope this will help.
regards,
rhandy
sample_POI.zip (11.2 KB)
Hi Rhandy,
That’s strange I cannot get the correct result just like your screen capture sample3 . Because without a correct result, so I cannot modify the code for it now.
I have set my Format in Region and Language to Arabic (Saudi Arabia), then run the test program attached.
If I set UTF8 the result still is messy code, if I comment it the result is “???”.
Ofcourse I cannot get correct result by the other two ways.
1. We are using OLEDB for query shapefile here, does that works well in your environment for read data?
2. If you found anything I need to set for environment or if you found I missed something in project please let me know.
My environment:
os: windows 7
language: arabic (saudi arabia)
ide: visual studio 2010
Mapsuite Core version: 7.0
Regards,
Don
007_006_005_004_003_002_001_sample.zip (2.96 KB)
Hello Don,
Sorry for the delayed reply, since you are running on windows 7, kindly change your language for non-unicode programs:
from CONTROL PANEL, select REGION AND LANGUAGE -> ADMINISTRATIVE TAB -> change the language for non-unicode programs to Arabic (Saudi Arabia) then click apply or okay and the system will ask for re-start (a must). no need to change the format and location.
Regards,
rhandy
Hi Rhandy,
Sorry I reply you late.
I just make sure it’s not a bug. The ShapeFileFeatureSource.Encoding won’t work for the ExcuteQuery function, Gary have a good reply in this topic: thinkgeo.com/forums/MapSuite…aspx#30747
Wish that help you.
Regards,
Don