LDIF or LDAPx parser is not working properly: removes the desired ldif file format spaces
Closed / Rejected27ff4ebe1c2421149aad5f536516015a238e47aaCreated 9 years agoUpdated 9 years ago
Descriptionplain2018-02-06 18:19:05
Hello
I used tcl8.4.14 and ActiveTcl versions 8.4.14 and 8.6.7.0 cd as well.
Where ldapx 0.2.4 version and with ActiveTCL ldapx 1.0 version available.
I face the issue that ldapx parser is removing the spaces which we ldif format provides it. The following is the
ldif input file
prcoedure
output
desired output
####
## content of LDIF file
dn: design data
LOGICAL LIBRARIES: lib1
PARAMETERS:
TOP ARCHITECTURE: structure
TOP LIBRARY: lib
TOP NAME: lib
WORK LIBRARY: work
dn: group #0
FILES: aaaaaaa
bbbbbbbbb
ccccccccccc
dddddddddddd
## Finish content of LDIF file
## start of tcl procedure
package require ldapx 0.2.4
# create input channel
::ldapx::ldif create liin
# link it to the input file
liin channel [open "file_in.txt" r]
::ldapx::entry create input_file
# each liin reads a "dn" from the input file
# read the first one with the design data
liin read input_file
set output1 [input_file get {logical libraries}]
puts stdout "this is the information contained in dn design data"
puts stdout $output1
#puts stdout "this is the information contained in the rest of dn"
while {[liin read input_file] != 0} {
set filelist [input_file get1 files]
puts stdout [format {"%s"} $filelist]
}
return
## finish of tcl procedure
# output of provided tcl file
aaaaaaabbbbbbbbbcccccccccccdddddddddddd
# expected output of provided tcl file
aaaaaaabbbbbbbbb ccccccccccc dddddddddddd
dgpplain2018-02-06 22:51:42
Problems with the package "ldapx" seem to belong here: https://core.tcl.tk/tcllib/tktnew
Log in (anonymous is fine) to add a comment.