Hi,
What is the instruction to open a Unicode TXT file .
Thanks for your help .
Hi,
What is the instruction to open a Unicode TXT file .
Thanks for your help .
local cUnicodeText
FW_SetUnicode( .t. )
cUnicodeText := MEMOREAD( "unicode.txt" )
MEMOEDIT( cUnicodeText ) hF := ttxtFile():new( cFilePath( exename() ) + "doc\1.txt" )
FW_SetUnicode( .T. )
hf := MemoRead( cFilePath( exename() ) + "doc\1.txt" )1.txt may not be containing UTF8 text.
Shampoo Anti Age con Acido Hialuronico Cab. Dañados por el paso del tiempo 1 Lt C/valv hf := memoread( cFilePath( exename() ) + "doc\1.txt" )
FOR x = 1 TO MLCount( hf )
cLinea:= MemoLine( hf,,x,.t.)
AAdd(a, cLinea)
NEXT
XBROWSER a#include "fivewin.ch"
function Main()
local oDlg, oFont, oBrw, cText
cText := "Shampoo Anti Age con Acido Hialuronico Cab. Dañados por el paso del tiempo 1 Lt C/valv"
? cText
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 560,200 PIXEL TRUEPIXEL FONT oFont
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE { cText } ;
COLUMNS 1 HEADERS "TEXT" COLSIZES 500 ;
LINES NOBORDER
WITH OBJECT oBrw
:nRowHeight := 60
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil

goosfancito wrote:me pasa que esta linea me la transforma en 2 lineas:
Shampoo Anti Age con Acido Hialuronico Cab. Dañados por el paso del tiempo 1 Lt C/valv
hasta cuando lo muestro en un xbrowse
hf := memoread( cFilePath( exename() ) + "doc\1.txt" ) Â Â FOR x = 1 TO MLCount( hf ) Â Â Â cLinea:= MemoLine( hf,,x,.t.) Â Â Â AAdd(a, cLinea) Â Â NEXT Â Â XBROWSER a