If the below code is run:
Code: Select all
Define string.s="9.9.9.9,áéíóúñ,XX,2025"
Define file.i
Define format.i
file = CreateFile(#PB_Any, "test.txt", #PB_UTF8)
If file
WriteString(file, String, #PB_UTF8)
CloseFile(file)
EndIf
file = OpenFile(#PB_Any, "test.txt")
format.i = ReadStringFormat(file)
If file
string = ReadString(file, format)
CloseFile(file)
EndIf
Debug(string)
CallDebuggerCode: Select all
hexdump -C test.txt (UTF8)
00000000 39 2e 39 2e 39 2e 39 2c c3 a1 c3 a9 c3 ad c3 b3 |9.9.9.9,........|
00000010 c3 ba c3 b1 2c 58 58 2c 32 30 32 35 |....,XX,2025|
0000001c
chardetect test.txt
test.txt: utf-8 with confidence 0.99
Code: Select all
9.9.9.9,áéÃóúñ,XX,2025

