Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1448

am looking for convert ansi to windows-1256 or utf-8 to wndows-1256 without digit prb

$
0
0
hi,i have a json utf-8 file ,content is like as :
HTML Code:

"header":{
            "date":"۳ روز پیش",
            "subtitle":"۳ روز پیش در مشهد، صیاد شیرازی | اجاره آپارتمان",
            "title":"اوائل صیاد 90 متر",
            "thumbnail":"https://s100.divarcdn.com/static/thumbnails/1614768313/AY_ET-xA.jpg",
            "place":"صیاد شیرازی",
            "business_logo":null
        }

so when i used json parser like as JsonBag and i wanted show result in a textbox so i used like as this :
Code:

text1=headerjson.Item("date")
or
MsgBox headerjson.Item("date")

but result is like as

HTML Code:

? روز پيش
so ? is same digit 3 but missing or converted to ?

i did try with chilkat like as

Code:

Dim ss As New ChilkatStringBuilder
ss.Append (headerjson.Item("date"))
success = ss.Decode("ansi", "Windows-1256")
MsgBox ss.GetAsString

and this time result was been :

Code:

3 روز پش
in this reult fixed number 3 and i found problem is about convert ansi to windows-1256 but in this chilkat example happened another problem about charachter ی because it should be
HTML Code:

3 روز پیش
---------------------------------------------------
i want just find a sample code without use chilkat about convert ansi to windows-1256 like as chilkat formula.

any body can help me about these 2 problems?
1- how can do that like as chilkat converting ansi to windows-1256

2-how can fix that ی in example chilkat?

Viewing all articles
Browse latest Browse all 1448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>