Another issue with characters higher than 7 bit (ie ascii 128 and over)
Create a view
Add a form called oFileNew
Add the following button
Code:
Object oButton2 is a Button
Set Location to 153 371
Set Label to 'Read In Test'
// fires when the button is clicked
Procedure OnClick
String sFile sCode sStatus sLine sSound
Boolean bClear
Integer iConfirm iChannel iCount iArraySize i iVal
Get Value of oFileNew to sFile
String sData
Get Value of oFileNew to sFile
If (sFile='') Begin
Send Stop_Box 'Invalid File'
Procedure_Return
End
Move (Seq_New_Channel()) to iChannel
Direct_Input channel iChannel sFile
If (SeqEof) Begin
Close_Input channel iChannel
Send Seq_Release_Channel iChannel
Send Stop_Box 'Invalid File'
Procedure_Return
End
Repeat
Readln channel iChannel sLine
Move (Trim(sLine)) to sLine <---Put a Stop Break here
If (sLine<>'') Begin
Increment iCount
End
Until [SeqEof]
Close_Input channel iChannel
Send Seq_Release_Channel iChannel
Send Info_Box 'Complete'
End_Procedure
End_Object
Now create a txt file with the following lines:
Code:
accordons
accords
accordât
accordèrent
accordé
accordée
accordées
accordéon
accordéoniste
accordéonistes
accordéons
accordés
accore
accores
Save the file and then set the value of oFileNew to the filename and path of this file.
In DF19 the sLine reads in correctly (except that it is ANSI and not UTF... but I'm not necessarily worried about that)
but DF20 does not result in the same value in sLine.