Go Back > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor


Google search

For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
Installation Wizard into new VRC
Manual into existing VRC
Manual into new VRC
Total votes: 49

Baanboard at LinkedIn

Reference Content

Thread Tools Display Modes
Old 22nd January 2013, 12:33
aseela aseela is offline
Join Date: Sep 2012
Posts: 2
aseela is on a distinguished road
Baan: 6.1 fp3 - DB: windows sql server - OS: windows server 2008 R2
Reading Arabic characters from a text file
Baan: ERP LN 6.1 FP3
C/S: Server

Dear Expert,

I have linked Baan to external executable using run.prog() to decode a given amount of money from numbers format to Arabic words in order to print some Arabic reports. The executable output a text file with a single line of Arabic string. Then I open the file, read the content and close it using, seq.gets and seq.close. I was successfully able to get the results into the reports, however, seq.gets() returns unrecognized characters. I've tried mb.import$(), uni.import() with no luck to convert the string out of seq.gets() variable.

extern	domain	tcmcs.long		ret1, ret2, ret3, ret4, ret5
extern	domain	tcmcs.str100	comm
extern	domain	tcmcs.str6		amnt
extern	domain	tcmcs.str80m	arabic_decode1, arabic_decode2

amnt = str$(amount)
comm = "e:\arabicdecode\arabicdecode.exe " & amnt
ret1 = run.prog("cmd.exe", "cmd /c " & comm, RP_WAIT)
if ret1 = 0 then
	ret2 ="e:\arabicdecode\converted.txt","r")
	ret3 = seq.gets(arabic_decode1, 80 ,ret2, GETS_NORMAL, ret4)
	ret5 = seq.close(ret2)
So, how to read this unicode text file with its Arabic characters?

Hint - Our environment installation has Arabic locale already, the database accept Arabic and we have some running Arabic reports.

Attached is a snapshot of the debugger with the garbage string.

Thank you
Attached Images
File Type: png ArabicDecode.png (5.9 KB, 27 views)
Reply With Quote
Old 22nd January 2013, 13:36
aseela aseela is offline
Join Date: Sep 2012
Posts: 2
aseela is on a distinguished road
Baan: 6.1 fp3 - DB: windows sql server - OS: windows server 2008 R2
Smile Reading Arabic from a text file

Thank you guys for the rich content of this forum. It helps me solve a lot of issues I'm facing. Regarding this issue, it is solved using utf8.import(). like this:
ret2 ="e:\arabicdecode\converted.txt","r")
ret3 = seq.gets(arabic_decode1, 80 ,ret2, GETS_NORMAL, ret4)
ret3 = utf8.import(arabic_decode2, arabic_decode1)
ret5 = seq.close(ret2)
Thank you
Reply With Quote
Sponsored Links

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Undocumented Functions & Variables george7a Tools Development 81 30th September 2015 11:35
Audit file structure baan_user Tools Development 8 4th May 2007 14:32 berthe Miscellaneous 4 12th May 2005 10:20

All times are GMT +2. The time now is 17:29.

©2001-2018 - -